Setting up Your C# Project

NDoc3

The first thing you want to do is make sure that Visual Studio.NET is creating the XML documentation file each time it recompiles your assembly projects. You do this by setting the "XML Documentation File" property in the project setting dialog.

While not absolutely necessary, it is best to name the XML documentation file with the same base name as the name of your assembly

This is done differently in Visual Studio 2005 and Visual Studio 2008, therefore both methods will be described

Visual Studio 2008 and 2010

Finding the assembly name

Finding the assembly name

 

Set the XML Documentation File property to the assembly name, but with the .xml extension. do not forget to select the "All Configurations" option before you set this property. That way you can document both release and debug builds.

 

Setting the documentation file name

Visual Studio 2005

Finding the assembly name

Finding the assembly name

 

Set the XML Documentation File property to the assembly name, but with the .xml extension. do not forget to select the "All Configurations" option before you set this property. That way you can document both release and debug builds.

 

Setting the documentation file name

Setting the XML Documentation Property

 

Now, each time VS.NET compiles your assembly, it will aggregate all of the code comments that you include in the source files, in the XML Documentation File.

Non-Visual Studio

If you do not use Visual Studio.NET, make sure to compile your C# projects using the /doc compiler option.