Click here to Skip to main content
13,409,065 members (46,752 online)
Click here to Skip to main content
Add your own
alternative version


106 bookmarked
Posted 12 Jan 2004

Integrating Help into Visual Studio .NET

, 17 Jan 2004
Rate this:
Please Sign up or sign in to vote.
Document your C# code and have on-the-fly help directly integrated into Visual Studio .NET.


Working on a project of any size, we all know how important good documentation is. Getting to write it is another issue though.

C# and the Microsoft .NET Framework has taken measures to help you with that. An XML documenting standard has been introduced that you write directly into the source code; much like Javadoc for Java.

In this article, I will explain how to document using the XML tags, how to use NDoc to convert the XML into very nice looking HTML Help files, and last but not least, how to integrate the help into Visual Studio .NET.


Before you can start documenting, you will need a couple of programs that are all available as free downloads:

I am not going to explain how to install these programs, they pretty much all install completely automatic. After installing all of those, you should be ready to start creating nifty documentation, that will be available directly in Visual Studio as Dynamic Help and Intellisense.

The actual commenting

The actual commenting of your source code is explained in this excellent article: C# Documenting and Commenting.

When you generate the NDoc documentation, you need to use the HtmlHelp2 format.

Using H2Reg to integrate the documentation into VS.NET

Usually, you would have to install a help file using a .msi install script. In this case, that is just way too much work. Fortunately, Helpware has made a small utility called H2Reg that can do it for us. It requires a configuration file and must be called from the command-line, so I thought a little helper program could make it a bit easier. There is a download link at the top of this article.

All you need to do now is fill in the fields and press Generate. The program will make a directory called Help in your project directory that will contain the configuration file, and two batch files that you can use to register and unregister the help files in Visual Studio .NET:

VS.NET Help Integrator Program - attached below

The help collection file you can find in the ./doc directory in your project directory (if you did not change the default NDoc directory, that is).

The program will generate the files in a directory called Help, one level above the NDoc directory. After you generate the files, you just need to run the register.bat batch file to register your help in Visual Studio .NET.

If you have problems with the collection not being registered, have a look at H2Reg's log file called C:\Program Files\Helpware\H2Reg\H2Reg_Log.txt (assuming you installed it in the default directory).

Including the help into Visual Studio .NET

The help files have now been activated and integrated into the Visual Studio Help Collection. You might need to restart Visual Studio .NET if you have it running.

Now we have context sensitive help, Intellisense and dynamic help:

VS.NET - fully integrated help


In a few simple steps, we have integrated help for our own code, pretty much all over the place.

To me, this is really a productivity booster. What about you?

Revision History

  • January 18th, 2004: Updated with new program and instructions to use HtmlHelp2.
  • January 22nd, 2004: Updated program to auto-register into Visual Studio's Help Collections, and updated article to reflect it.


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


About the Author

Sune Trudslev
Web Developer
Denmark Denmark
Sune has been programming since 1985.

He has worked with both assembler and many different programming languages, such as: Basic, Fortran, Pascal, C, C++, Delphi, and lately C#.

Sune is married and has two small children and is currently working as a developer for a Danish company called Skygate, currenly working on a cheap flight search engine called Momondo.

Personal blog can be found here.

You may also be interested in...


Comments and Discussions

GeneralAccessing documentation from a network location Pin
Muaddubby10-Feb-09 9:46
memberMuaddubby10-Feb-09 9:46 
Generalexporting databases accross ms sql server 2005 instances Pin
onyash.edd27-May-08 2:35
memberonyash.edd27-May-08 2:35 
GeneralHelp not showing up in VS 2003 Pin
echmyr18-Oct-05 6:23
memberechmyr18-Oct-05 6:23 
QuestionIntellisense? Pin
Jon Merrifield1-Jun-05 0:03
memberJon Merrifield1-Jun-05 0:03 
GeneralPlease help Pin
AspNetNet12-May-05 6:22
memberAspNetNet12-May-05 6:22 
GeneralProblems installing VSHIK 2003 Pin
Anonymous20-Sep-04 0:03
sussAnonymous20-Sep-04 0:03 
GeneralRe: Problems installing VSHIK 2003 Pin
lonifasiko20-Sep-04 0:58
memberlonifasiko20-Sep-04 0:58 
GeneralMethods link to namespace Pin
Xileh11-Jun-04 12:48
sussXileh11-Jun-04 12:48 
GeneralRe: Methods link to namespace Pin
tulling9-Dec-04 8:32
membertulling9-Dec-04 8:32 
QuestionNamed Indexes; How to register? Pin
Sameers (theAngrycodeR )25-May-04 4:26
memberSameers (theAngrycodeR )25-May-04 4:26 
GeneralNew version of NDoc (beta) Pin
Don Kackman28-Mar-04 8:27
memberDon Kackman28-Mar-04 8:27 
GeneralRe: New version of NDoc (beta) Pin
leppie28-Mar-04 12:16
memberleppie28-Mar-04 12:16 
GeneralRe: New version of NDoc (beta) Pin
Sune Trudslev29-Mar-04 10:08
memberSune Trudslev29-Mar-04 10:08 
GeneralProblem with links Pin
Anonymous23-Jan-04 9:58
sussAnonymous23-Jan-04 9:58 
GeneralRe: Problem with links Pin
Sune Trudslev23-Jan-04 11:27
memberSune Trudslev23-Jan-04 11:27 
Are you having problems downloading the tool?

The link works fine for me.

You can alternatively download if from this link:
GeneralProblems solved and automatic registration in VS collection Pin
RossDonald21-Jan-04 18:52
memberRossDonald21-Jan-04 18:52 
GeneralRe: Problems solved and automatic registration in VS collection Pin
Sune Trudslev21-Jan-04 22:27
memberSune Trudslev21-Jan-04 22:27 
GeneralVSCC Doesnt see Help files Pin
Tom Guinther21-Jan-04 12:14
memberTom Guinther21-Jan-04 12:14 
GeneralRe: VSCC Doesnt see Help files Pin
Sune Trudslev21-Jan-04 22:25
memberSune Trudslev21-Jan-04 22:25 
GeneralRe: VSCC Doesnt see Help files Pin
Tom Guinther22-Jan-04 12:17
memberTom Guinther22-Jan-04 12:17 
GeneralRe: VSCC Doesnt see Help files Pin
Sune Trudslev22-Jan-04 12:27
memberSune Trudslev22-Jan-04 12:27 
Question.hxc file? Pin
smallguy7820-Jan-04 0:01
membersmallguy7820-Jan-04 0:01 
AnswerRe: .hxc file? Pin
Sune Trudslev20-Jan-04 0:13
memberSune Trudslev20-Jan-04 0:13 
GeneralRe: .hxc file? Pin
smallguy7820-Jan-04 0:19
membersmallguy7820-Jan-04 0:19 
AnswerRe: .hxc file? Pin
Don Kackman20-Jan-04 5:59
memberDon Kackman20-Jan-04 5:59 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180221.1 | Last Updated 18 Jan 2004
Article Copyright 2004 by Sune Trudslev
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid