Take the 2-minute tour ×

I've recently started a new project and I'm using C# for the first time. I've found that while Visual Studio is helpful in creating C#'s XML comments to document your classes and methods, there's not much you can do to generate MSDN or Javadoc style documentation.

Google tells me that Visual Studio 2003 included a tool to generate such documentation, but it is not longer included in later versions of the IDE.

What are my options if I wish to make use of my carefully crafted (I assure you!) XML markup?

share|improve this question

11 Answers 11

up vote 65 down vote accepted

Thanks for the answers, but Sandcastle seems a bit painful to configure and use so I kept looking. I've just found another alternative - Doxygen.

Doxygen generates javadoc style documentation, although it looks like it's primarily intended to generate documentation from custom markup within your comments. Evidently, Doxygen also supports C# XML Comments, although I can't find any mention of it on their website!

Anyway, I recommend it. It's easy to use, supports multiple languages and also generates class diagrams for you.

share|improve this answer

you can use sandcastle to do it.

some resources on it are: Sandcastle:

Articles on documenting the C# code:

share|improve this answer

May I humbly suggest to try ImmDoc.NET - a simple project I've developed some time ago and recently published on CodePlex. It is light-weight, very easy to use and supports .NET 2.0.

share|improve this answer
ImmDoc was very fast and produced pretty documentation, and the only other solution I found that supports 4.0 dll:s were Sandcastle and the difference in speed is that Sandcastle takes 5 minutes and ImmDoc takes 10 seconds. –  Kristoffer L Jul 5 '10 at 9:57
ImmDoc.NET is nice but it does not appear to support VB.NET. –  rsrobbins Nov 16 '10 at 20:40
Quick and simple to use, but it doesn't appear to grab my summary tags - so descriptions end up being empty. Maybe it's just user error. –  Derek W Feb 5 at 16:54
Same here. immDoc.NET seems to not grab summary tags which we really need. I tried to find the problem in the source, but couldn't figure it out in 30mins.. –  Peter Gfader Mar 12 at 15:31
this doesn't seem to work on .cs files which seems like a crippling limitation... –  jheriko Apr 8 at 9:09

@Portman: NDoc is dead and while Sandcastle may be the next best (to being dead) Doxygen is so simple to use straight 'out of the box' it is also very configurable.

It also has a GUI that helps with configuration and testing so you can tweak to your hearts content.

share|improve this answer

I'm glad you found the best alternative - Doxygen! I am using Doxygen for C#.NET and it generates class diagrams, inheritance diagrams, etc. Here is an informative blog post.

share|improve this answer

Thanks to @zappan answer which help me, I am going to simplify for every one who want to Create .Net Documentation. I use this document as reference:

First of all you should enable "generate an XML documentation file for a Visual Studio" (Visual studio does not create this file by default):

Right click on project and select Properties Which bring Properties window. Select Build tab and finally enable XML documentation file. Make sure after this stage you Build your project.

Secondly Download Sandcastle Help File Builder which help creating document API easily by providing a GUI . Notice it contains Sandcastle installation file, so you does not need download Sandcastle.

Now creating an documentation is easy:

1- Open Sandcastle Help File Builder and create new project.

2- In Project Explorer right click on Documentation Source and select Add Documentation Source.

3- Navigate to folder where your dll assembly file and XML documentation file located (typically in bin/debug folder). Select assembly and xml file and click Open button.

4- In Documentation menu select Build Project.

After this step, help is in your Sandcastle root folder project and in Help folder.

share|improve this answer

The Live Documenter is a .NET comment documentation tool. Works for all versions of .NET and seems to support all of the new features.

share|improve this answer

Sandcastle is the only free alternative I know.

share|improve this answer

I can't believe it's been 11 hours and nobody has mentioned NDoc, which does exactly what you're looking for.

share|improve this answer
NDoc is no longer under development. Sandcastle is probably next best. –  Michael Ratanapintha Sep 8 '08 at 0:12
Well, Kevin stopped development, but I think that was partly because the product was mature and essentially finished. geekswithblogs.net/dtotzke/archive/2006/08/03/87038.aspx –  Portman Sep 10 '08 at 1:27
I recall development on NDoc was stopped because some users were abusive and threatening. Hard to believe anyone using a free product could behave that way, but it was the final straw for him. It killed NDoc. –  Bernhard Hofmann May 26 '11 at 9:41

I use this one, only because Sandcastle didn't seem to be ready yet when I needed it: CodeDoc

Edit - I used internet explorer at that job, just realized the site doesn't seem to work in firefox :(

share|improve this answer

Another alternative to generate docs from XML comments is docu.

share|improve this answer

Your Answer


