Sign in to follow this  
Lucidquiet

[.net] C# Documentatoin tool. Newb Q.

Recommended Posts

Lucidquiet    199
This is likely a newb question. Is there a tool like that JavaDoc tool for C# or the .NET framework in general? I've seen NDoc around, etc, but I don't think this is standard issue for VS, I could be wrong. Help appreciated. Thanks, L-

Share this post


Link to post
Share on other sites
Telastyn    3777
In the project build settings there's a flag to turn on XML document generation (based off the three-slash comment style). It's then up to you (or an external tool) to turn that into something less... XML.

Share this post


Link to post
Share on other sites
Cygon    1219
The standard for C# are XML comments. If you're using Visual Studio 2005 or Visual C# 2005 Express, when you type three slashes (///) with the cursor above a method or class, the IDE will automatically insert the propert XML doc comment for you. It looks like this:

/// <summary>Does something</summary>
/// <param name="test">No idea</param>
public void Foo(int test) {}

As Telastyn pointed out, you need to explicitely enable XML doc generation in your project settings. From there on, the C# compiler will even generate warnings if a public class or method isn't documented properly. It even validates that the param tags match a method's argument list.

There aren't many tools available to proces the XML files generated by the compiler into a human-friendly documentation format. NDoc for once has been abandoned and does not understand many of the .NET 2.0 features such as generics. Your best bet right now would be SandCastle, the documentation generator used by Microsoft internally. It's now available to the public, and thought it's still in the beta stage, it is working very well. If you want to give it a try, you'll need these tools:

HTML Help Workshop
SandCastle March 2007 CTP
SandCastle Help File Builder

-Markus-

Share this post


Link to post
Share on other sites
kanato    568
Doxygen can parse the XML comments, although it doesn't use the XML file that's outputted by the compiler, it reads them directly from the C# source code. It generates fairly nice documentation

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this