Generating HTML Help files based on XML documentation

Since discovering the XML commenting features built into .NET years ago I have been using it to help make my code more readable and simpler for other developers to understand exactly what the code is doing.

Entering /// preceding a line of code causes Visual Studio to insert "summary" tags.  It also results in additional tags being generated if you are commenting a method with parameters and a return type.

I already knew that Intellisense would pick up these comments and display them when coding and selecting properties, methods, etc. from a class.  I also knew that you could set Visual Studio to generate an XML file containing said comments.  Only recently did I begin to wonder if I could generate some kind of readable help files based on these comments I so diligently added.


After searching the web I came across NDoc, an open source project which creates documentation for you based on the XML files generated by Visual Studio.  Unfortunately, NDoc has become stale and no longer supported (last release was back in 2005).

Fortunately there is a little known tool from Microsoft themselves called "Sandcastle Help File Builder".  This nifty little tool gives you a graphical interface that allows you to specify multiple DLL and XML files from which to generate a MSDN like HTML Help File for your own projects!

You can check it out here: http://shfb.codeplex.com/

If you are curious how to set Visual Studio to generate the above reference XML documentation files simply go to your projects property page and edit as shown below (my paths are specific, you can leave yours at the default values):

Print | posted on Friday, February 11, 2011 2:00 PM

Feedback

# re: Generating HTML Help files based on XML documentation

left by Yasir Kamal at 5/15/2012 2:25 AM Gravatar
hi, thanks for this post i had a knowlwdge about generating xml file but have no idea about generating help file from that thanks for this post . very helpfull

# re: Generating HTML Help files based on XML documentation

left by Siva at 2/4/2013 2:49 AM Gravatar
Hi, thx for pointing me in the right direction. I was all along looking to created a help file with XML comments and you have done exactly the same.
Post A Comment
Title:
Name:
Email:
Comment:
Verification: