Documentation of C# Code with SandCastle and Visual Studio 2010
In this post I'll show you, how you can create a documention of your code. In the past ndoc was the tool to create code docus but the project seems to be dead. Therefore we use SandCastle, a freeware tool, that is also used by Microsoft to create Code-Documentations.
Here is the reference of the comments within visual studio:
First of all you need to install these things in the given order.
Now in the build tab check the "XML Documentation File". The xml is now generated in the \bin\Debug folder. Of couse you can enter your own path if necessary.
Now rebuild your solution and check if a xml file exists beside the newly created dll.
The next steps are to open the GUI (SandCastel Help File Builder) and create a new project. You should find the gui in your start menu > programs.
I don't want to reinvent the whell therefore, I forward you to some other sites. These sites can explain the next steps certainly better than I can. If you choose the Step by Step Tutorial, you can now start by step 4.
Here is the reference of the comments within visual studio:
- http://msdn.microsoft.com/en-us/library/b2s063f7.aspx
- http://msdn.microsoft.com/en-us/magazine/cc302121.aspx
First of all you need to install these things in the given order.
- Download and install SandCastle http://sandcastle.codeplex.com/releases/view/47665
- Download and install SandCastle Help File Builder (shfb). This is a gui for SandBox. Sandbox is mostly a command line driven tool, with a poor gui. This tool helps to create the documentation easier. http://shfb.codeplex.com/releases/view/40105
- If you want to create MS specific .chm (Compiled Html Help) files, download and install htmphelp.exe.
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=00535334-c8a6-452f-9aa0-d597d16580cc
Before you can create the code documentation, you have to create the documentation XML in Visual Studio. Therefore open your solution. Open the properties of a project within the solution.
Open Properties |
Now in the build tab check the "XML Documentation File". The xml is now generated in the \bin\Debug folder. Of couse you can enter your own path if necessary.
Now rebuild your solution and check if a xml file exists beside the newly created dll.
The next steps are to open the GUI (SandCastel Help File Builder) and create a new project. You should find the gui in your start menu > programs.
I don't want to reinvent the whell therefore, I forward you to some other sites. These sites can explain the next steps certainly better than I can. If you choose the Step by Step Tutorial, you can now start by step 4.
- A Step by Step Tutorial : http://broadcast.oreilly.com/2010/09/build-html-documentation-for-y.html
- A good post about the history and how you setup a project in sandcastle: http://grantpalin.com/2010/01/10/net-projects-generating-documentation-with-sandcastle/
Comments