Sandcastle and API Documentation

I’ve received a few emails recently on how I created the API documentation for my Wiimote library so I thought I’d answer here with a brief tutorial.

The answer, in case you didn’t read the post subject, is Sandcastle. Sandcastle is a tool developed by Microsoft which builds MSDN-style help files by using reflection and XML comments from the source code of a project. Out of the box, Sandcastle is command line driven and kind of a pain to deal with, so I highly recommend the very easy to use Sandcastle Help File Builder (SHFB) application also hosted on CodePlex. This front-end provides a simple UI for setting options and building your help file in just a few minutes. The rest of this post assumed you have both Sandcastle and Sancastle Help File Builder installed.

Building documentation is easy. First, add XML documentation comments directly to your source code. You can do this by typing 3 forward slashes in Visual Studio above your …

Read More