Click here to Skip to main content
11,720,374 members (80,376 online)
Click here to Skip to main content

MSDN style help for VB.NET projects using VBCommenter from Gotdotnet

, 29 Jun 2004 144.1K 47
Rate this:
Please Sign up or sign in to vote.
Creating Help files for VB.NET

Introduction

Its quite important to have project help documentation while working in a team environment. C# has integrated Web Comments generator which makes this task quite easy. As for VB.NET developers, this is not the case. But the GotDotNet PowerToys community has developed a tool called VBCommenter, which is an add-in in the VS.NET IDE. This tool allows us to create C# like comments in our VB.NET code and convert them into an XML file during project builds. This output XML file can be used along with NDoc to create quick and easy help files for your projects.

Background

Integrating Help into Visual Studio.NET and C# Documenting and Commenting are very good articles on how one can create and use help files in C# projects. This article is conceptually similar, except it is applicable in VB.NET environment.

Before we start

Following are required to start this process:

  • VS.NET 2003 (I have read that VBCommenter also works with VS.NET 2002, but haven't tried it)
  • NDoc: download
  • VBCommenter v1.1.1: download

Using VBCommenter

Step1 : After installing VBCommenter in an appropriate directory, it is shown as an add-in in the VS.NET IDE.

Step2 : VBCommenter Settings dialog opens where you can set the whether you want comments file to be generated at every build, whether XML comments are required in the source file and what type of prefix is required for creating these comments. I usually select the ''' prefix so that i can distinguish between single line comments in the code from the VbCommenter comments at the top of classes and functions.

Step3 : Commenting your code with VbCommenter is easy. You type the prefix (''') right on top of any method, hit Return and the comment block appears. Add your comments and save.

Step4 : Build your project. You will see an XML file in the bin directory with the same name as your project.

Using NDoc

Step1 : NDoc asks you to provide an input DLL name and an Input XML file. You also have to enter the type of documentation required. For example, MSDN is selected in the diagram below. Specify a location for the output HTML files in the "OutputDirectory" parameter.

Step2 : Generate the help files using Ctrl+Shift+B.

Sample Help File Web Pages

Thats it! With very little effort, you have MSDN quality Help files for easy accessibility over the intranet. You also have the option of integrating this help in VS.NET IDE. See Integrating Help into Visual Studio.NET

Points of Interest

While working with VbCommenter and NDoc I came accross a few hurdles.

  • If VB.NET projects do not have a namespace (neither as a root namespace in the Project Properties nor in the code), NDoc creates help files with (global) namepsace. Comments in the summary blocks, remarks blocks etc. are not shown. So, you have to have namespaces defined for your projects.
  • If the comment description in any tag contains special characters like "&" and "<" then NDoc creates faulty documents, even though VBCommenter makes an accurate XML. Avoid using special characters, instead write it out (for e.g. less than instead of <).
  • For a current bug list tracker, visit the VbCommenter website.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Adrita Bhor
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralReally good one Pin
sirbalaji6-Jul-09 18:59
membersirbalaji6-Jul-09 18:59 
QuestionNdocconsole Pin
jstark11016-Mar-07 5:28
memberjstark11016-Mar-07 5:28 
Questionwhy does not it work? Pin
Member #36054277-Mar-07 4:42
memberMember #36054277-Mar-07 4:42 
GeneralThanks Pin
Vikas Kumar Singh26-Feb-07 0:15
memberVikas Kumar Singh26-Feb-07 0:15 
QuestionVB 2005 support Pin
Ronny Flaatten19-Jun-06 16:00
memberRonny Flaatten19-Jun-06 16:00 
AnswerRe: VB 2005 support Pin
AndrewVos16-Oct-06 1:01
memberAndrewVos16-Oct-06 1:01 
GeneralHistory Pin
paulsoren27-Nov-05 0:38
memberpaulsoren27-Nov-05 0:38 
Generalneed help here! Pin
blckmamba18-Oct-05 6:42
sussblckmamba18-Oct-05 6:42 
GeneralNDoc problem not reading xml correctly Pin
Nehal13-Oct-05 8:10
memberNehal13-Oct-05 8:10 
GeneralVBCommenter doesn't appear in Tools Pin
Nam Chuong17-Jul-05 17:49
memberNam Chuong17-Jul-05 17:49 
GeneralUrgent Help Required! Pin
Anonymous19-Jan-05 23:20
sussAnonymous19-Jan-05 23:20 
GeneralRe: Urgent Help Required! Pin
Adrita Bhor21-Jan-05 12:59
memberAdrita Bhor21-Jan-05 12:59 
GeneralRe: Urgent Help Required! Pin
sathiya narayanan9-Sep-05 4:19
susssathiya narayanan9-Sep-05 4:19 
QuestionNice idea but does it work? Pin
coolerboby22-Nov-04 23:52
membercoolerboby22-Nov-04 23:52 
AnswerRe: Nice idea but does it work? Pin
Adrita Bhor23-Nov-04 7:53
memberAdrita Bhor23-Nov-04 7:53 
GeneralRe: Nice idea but does it work? Pin
coolerboby26-Nov-04 0:53
membercoolerboby26-Nov-04 0:53 
GeneralProblems with attributes Pin
Alberto Venditti26-Aug-04 6:21
memberAlberto Venditti26-Aug-04 6:21 
GeneralRe: Problems with attributes Pin
Adrita26-Aug-04 6:38
memberAdrita26-Aug-04 6:38 
GeneralWon't work with Overloaded Methods Pin
fabulous3-Aug-04 19:30
memberfabulous3-Aug-04 19:30 
GeneralProblems with NDoc! Pin
binolino10-Jul-04 2:28
memberbinolino10-Jul-04 2:28 

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
Web02 | 2.8.150901.1 | Last Updated 30 Jun 2004
Article Copyright 2004 by Adrita Bhor
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid