Generate documentation for .Net assemblies
By ganton ~ September 18th, 2008. Filed under: .Net tools.
Today, I finished an internal Dll in my current company and I’ve decided to build documentation for it. In the past I was used NDoc to do so but now I’ve decided to look for something new. I found Sandcastle project. This is a Microsoft project
Sandcastle is used internally to build .Net Framework documentation
as it is written at http://msdn.microsoft.com/en-us/vstudio/bb608422.aspx. Further, I found an open source project named DocProject which uses Sandcastle. DocProject installs a Visual Studio 2005/2008 projects and helps generating assembly documentation. I did a project and build it and I found the result chm help very nice.
Note that in order to build documentation first of all you need to document your assembly’s classes using XML comments. For instance
/// <summary>
/// Method summary.
/// </summary>
/// <param name="param">Param description.</param>
/// <exception cref="FileNotFoundException">Thrown when there is no file.</exception>
public void SomeMethod(object param) { }
Then you should enable XML documentation file option in Project Properties/Build/Output. And if we assume that you have installed Sandcastle and DocProject you are ready to add a DocProject in you solution and to follow the user. The result will be a nice MSDN style documentation chm file.