Wednesday, August 21, 2013

Filled Under:
,

12 Steps To Create C# Documentation Using Xml Using SandCastle

C# Documentation Using Xml

Hello Friends,

Today I am writing this post because of creating a documentation of coding for .Net developers.  Documentation will to understand code standard, programming tricks and project that is created by other.


C# Documentation Using Xml

1.    First of all Programmer/Developer have to write xml comment 
       code  in Source  file.

Example:
/// <summary>
/// The constructor sets the name, age and cash
/// </summary>
/// <param name="name">The name of the guy</param>
/// <param name="age">The guy's age</param>
/// <param name="cash">The amount of cash the guy starts with</param>

 2.   There are some predefined tags for xml comment.
        Summary, Param, returns, remarks, code, example etc.

3.    After creating comment create exe/dll and xml file of project which
       will be reside   inside bin or bin\debug folder of project. For 
       creating  xml

4.    Open Solution Explorer--> Right Click on project and open 
       properties-->choose Build tag and Inside Build tag check on
       checkbox XML documentation File and give the appropriate 
       name.



5.     After that build the project for creating the xml and dll/exe.
        For creaing documentation use Microsoft sandcastle tool.

6.     SandCastle Documentation Compiler Tools, can be downloaded 
        at  http://sandcastle.codeplex.com/releases/view/47665

        SandCastle Help File Builder, a tool with GUI to generate 
       documentation  file, can be downloaded at
          http://shfb.codeplex.com/

7.     After Installing SandCastle open SandCastle Help File Builder GUI
        From program menu. Screen would be like

8.    Create New Project from File Menu and give the name of project
       And save it anywhere besides (Desktop, My Document).

9.   HTML HELP 1 (CHM)  is used for creating chm help file.
      WEBSITE (HTML/ASP.NET) is used for creating web page.



          Framework according to your project like 3.5, 4.0 etc.

10.    Right click on Document Source menu from project explorer and
         Choose Add Document Source and select your dll/exe and xml file
         from project.

11.   From path tab give the Help Content Output Path  it could be
        Anywhere besides (Desktop, My Document) and Folder 
        name should be  “Help”


12.   And Last click on Build Project from Documentation Menu. And
         it will create all the file in given path folder.

If you like this post share it.. If you encounter any problems, feel free and comment
 below to find solution. Share Your Experience with us.





6 comments: