views:

8910

answers:

11

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?

+21  A: 

you can use sandcastle to do it.

some resources on it are: Sandcastle:

Articles on documenting the C# code:

zappan
+1  A: 

Sandcastle is the only free alternative I know.

Bjorn Reppen
A: 

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 :(

AlexCuse
+1  A: 

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

Portman
NDoc is no longer under development. Sandcastle is probably next best.
crosstalk
Well, Kevin stopped development, but I think that was partly because the product was mature and essentially finished. http://geekswithblogs.net/dtotzke/archive/2006/08/03/87038.aspx
Portman
+20  A: 

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.

Matt
+2  A: 

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.

Kevin P.
+3  A: 

@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.

DilbertDave
A: 

Thanks Matt for the recomendation of Doxygen! Easy to use and a very nice application.

+2  A: 

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.

Immortal
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
A: 

These days a number of commercial and open source tools have been developed for this purpose. However(unfortunately), non of them meet my requirement for specific problem I am dealing with. Currently, I am working on a project that exposes a different classes and functions to user as scripting interface. the user can use the objects from custom scripting interface and call methods to solve some specific problem. The problem I am facing is users of my classes need some sort of documentation in order to write their script efficiently. To address this problem am planing to use the compiler generated XML file to provide context sensitive help, which allows users to mouse over on any of the controls and corresponding methods from the GUI and read the reference documentation of the class/method. Now ... here are my questions: Can I get the sample source code Can any one give me someone point me to some sort of best approach to address the problem?

Thanks

Yonas

Yonas
A: 

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

Barry Jones