This content is not currently approved and is visible here for review only.

Library tutorials & articles

Object Library generators for .Net (NDoc)

Method for C#.NET

Microsoft Visual Studio.Net provides a facility to document your code and generate help object library. To do so, go to tools and select build comment web pages. A new dialog window will open and after selecting appropriate window press OK and html help object library will be generated. But it doesn’t achieve our goal fully because in this kind of help we don’t have any facility to search for classes, methods and properties etc. Further more this built in facility is only available for C#.Net and not for Vb.Net.

 

So after some research, we found some help and object library generators for .Net. Pros and cons of some of them have been added in appendix for further references.

 

      Method and Tools used

In order to achieve to achieve our goal to use one generic method for both Vb.net and C#.net we used NDoc 1.3.1 - Code Documentation Generator for .NET along with a plug-in called VBCommenter. This plug is used to add similar functionality which is provided by VS.Net for C#.Net.

Method for C#.Net

NDoc generates the help file using a XML file. Let’s have an example and this will help to understand it further more.

Open the project for which code documentation is required.

Then go to Solution Property Page and click on configuration properties and enter the name of xml for ‘Xml Documentation File’ and press Ok. As shown in figure 1.

 

Example

If we have a class

/// <summary>

            /// Summary description for Class1.

            /// </summary>

            /// <remarks></remarks>

public class Class1

            {

/// <summary>

                        /// Constructor

                        /// </summary>

                        /// <remarks></remarks>

                        public Class1(){}

 

/// <summary>

                        /// Method

                        /// </summary>

                        /// <param name="str"></param>

                        /// <remarks></remarks>

public checking(){}

            }

 

 

To get the red text above in you class header, method header, property header, interface header, member etc, press /// and enter. Text mentioned above in red will appear in a block and you can fill the tags accordingly.

 

When you will run the project or build it, an XML file will be generated in bin folder every time project is build. That is one of the requirement of Ndoc in order to generate help Documentation. Second requirement is project exe file or assembly file.

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Object Library generators for .Net (NDoc).

Leave a comment

Sign in or Join us (it's free).

AddThis

Related podcasts

  • CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly Media

    CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly MediaHosts Ken Levy and Markus Egger discuss the new State of .NET events, IE8, ASP.NET MVC, followed by an interview from PDC with two editors from O'Reilly Media. More on ASP.NET MVC can be found at http://asp.net/mvc. Interview...

Related jobs

Events coming up

  • Dec 6

    Developing AJAX Web Applications with Castle Monorail

    London, United Kingdom

    Monorail is the model-view-controller engine of the Castle Project, bringing many of the best ideas of Ruby on Rails to the .NET world. In this talk, David De Florinier and Gojko Adzic show how Monorail makes it easy to develop .NET based AJAX applications, and how to use the Castle Project to build Web 2.0 applications effectively. Come to this session if you are a .NET web developer. Everyone is welcome!