Click here to Skip to main content
Click here to Skip to main content

Generate .chm based documentation of your project using SandCastle tool

, 12 Dec 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
.Chm based documentation generator for .net projects

Editorial Note

This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.

 

Table of Contents

  1. Introduction
  2. What is Sandcastle tool 
  3. Installing the sandcastle tool 
  4. Generate XML documentation of your project 
  5. Create New Project In Sandcastle GUI
  6. Add document resource in project 
  7. Build Your sandcastle project
  8. Generated .chm help file for your project 

 

Introduction

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

First download sandcastle tool from http://sandcastle.codeplex.com/. and Sand Castle help file Builder from shfb.codeplex.com
  1. Install the Sandcastle tool
  2. Unzip and SHFBGuidedInstaller_1940 file and click on SandcastleInstaller.exe, It will install the basic component used by sandcastle tool
  3. Go to InstallResources folder with in folder you have extracted. 
  4. Install the SandcastleHelpFileBuilder_1940.msi
  5. It will install the SandCastle help file builder gui tool in C:\Program Files\EWSoftware\Sandcastle Help File Builder
  6. 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
  1. Right Click on your project select property
  2. Click Build=>Check the XML documentation file
  3. Save the project
  4. Build your project, and you will find XML documentation file with in your bin folder.
  5. Close the solution

 

 

Create New Project In Sandcastle GUI

Steps
  1. Go to C:\Program Files\EWSoftware\Sandcastle Help File Builder and click on SandcastleBuilderGUI.exe 
  2. Click on File and then  New Project 
  3. 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)
  4. You have your project ready.  


 

Add document resource in project

 

  1. Right Click on document resource
  2. Click on add document resource
  3. Navigate to your project bin folder(visual studio project's bin folder)
  4. Select your project's dll file and XML file 

  1. Click On open and the will add these files under document resource 
  2. Select Projects basic properties like Header and footer text for you .chm help file
  3. Modify the help title, CopyrightText, CopyRightHref, FeedbackEmail Address and there many other properties you can set as your need 

Build Your sandcastle project project

  1. Now Press ctrl+shift+B to build your project
  2. It will take little time to build the project. 

Generated .chm help file for your project  

  1. When it will finished build
  2. You need to navigate to the folder where you  have saved your sandcastle project.
  3. Navigate to help folder
  4. Click on help file
  5. You  have your chm based documentation ready.

 

Summary

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Vijay Tanwar
Software Developer (Senior) Nagarro Softwares
India India
I am vijay tanwar and i am a software engineer with passion of programming. I love to programming in c#, I love to warp up more and more things in few lines of code. my favirote languages are c# and javascript and both are fully object oriended. I always like to become the .net Architect.
Follow on   Twitter

Comments and Discussions

 
QuestionGenerate chm from database table PinmemberMember 1077877227-Apr-14 9:41 
GeneralMy vote of 5 Pinmemberusmaniftikhar20-Jul-13 21:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 13 Dec 2012
Article Copyright 2012 by Vijay Tanwar
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid