Table of Contents
- What is Sandcastle tool
- Installing the sandcastle tool
- Generate XML documentation of your project
- Create New Project In Sandcastle GUI
- Add document resource in project
- Build Your sandcastle project
- Generated .chm help file for your project
After completing development of product, we need to give the final delivery. We also need to give the collection of documents related to application features, documentation of code etc. .Chm based documentation are always have been the good choice. User can navigate from one sections to other section easily, just be clicking on links. He/She also able to search any particular word in the file. There are different tool available in the market that can generate the .chm based documentation easily from your project or compiled assembly. I find the Sandcastle best. because its free and developed by Microsoft itself and provide lots of functionality.
What is Sandcastle tool
This is the tool created by Microsoft and freely available on sandcastle.codeplex.com. Sandcastle produces accurate, MSDN style, comprehensive documentation by
reflecting over the source assemblies and optionally integrating XML
Documentation Comments. It generate the .chm file based documentation for you project.
Installing the sandcastle tool
- Install the Sandcastle tool
- Unzip and SHFBGuidedInstaller_1940 file and click on SandcastleInstaller.exe, It will install the basic component used by sandcastle tool
- Go to InstallResources folder with in folder you have extracted.
- Install the SandcastleHelpFileBuilder_1940.msi
- It will install the SandCastle help file builder gui tool in C:\Program Files\EWSoftware\Sandcastle Help File Builder
- You have now every thing ready
Generate XML documentation of your project
Now you need to Generate the xml based documentation for your project
This is very simple, follow the below steps
- Right Click on your project select property
- Click Build=>Check the XML documentation file
- Save the project
- Build your project, and you will find XML documentation file with in your bin folder.
- Close the solution
Create New Project In Sandcastle GUI
- Go to C:\Program Files\EWSoftware\Sandcastle Help File Builder and click on SandcastleBuilderGUI.exe
- Click on File and then New Project
- Give your project a name and save it on any desired location(When
you create the new project, it will ask you the name and location to
save the project)
- You have your project ready.
Add document resource in project
- Right Click on document resource
- Click on add document resource
- Navigate to your project bin folder(visual studio project's bin folder)
- Select your project's dll file and XML file
- Click On open and the will add these files under document resource
- Select Projects basic properties like Header and footer text for you .chm help file
- Modify the help title, CopyrightText, CopyRightHref, FeedbackEmail
Address and there many other properties you can set as your need
Build Your sandcastle project project
- Now Press ctrl+shift+B to build your project
- It will take little time to build the project.
Generated .chm help file for your project
- When it will finished build
- You need to navigate to the folder where you have saved your sandcastle project.
- Navigate to help folder
- Click on help file
- You have your chm based documentation ready.
So you have been walkthrough this article and find out that how we can generate the documentation of our product easily with the help of SandCastle tool. Try it, it will save your lots of time, required to generate the documetation.