NDoc User's Guide NDoc 1.3

Setting up Your C# Project

[This is preliminary documentation and subject to change]

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:


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.

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