You are here: Documenter for .NET > Documenter for .NET Guided Tour > Selecting the Assemblies to Document > Generating the XML Documentation File

Generating the XML Documentation File

To generate the XML documentation file, configure your project in Microsoft Visual Studio. The C# compiler will parse the XML comments and generate the XML documentation file when you build the project. The compiler will even issue warnings about undocumented members and broken cross-references, so you can check that the documentation is complete.

Note: This tutorial assumes you have a C#.NET project named C1BarCode containing the C1.Win.C1BarCode.Dll assembly. The following steps have been provided only as an example of how to create an XML documentation file. The XML documentation file for this tutorial has already been created and is available in the C:\Program Files\ComponentOne\DocToHelp\Tutorial\BarCode\BarCode Assembly\Original folder.

To generate the XML Documentation file:

Using Visual Studio 2002/2003

 

1.   Open the C1BarCode assembly project created in Creating an Assembly if it is not already open.

2.   Select C1BarCode Properties from the Project menu. The Property Pages dialog box appears.

3.   In the Configuration drop-down list at the top of the Property Pages, select Release.

Note: The XML documentation option was added to the Release configuration only. This is because most projects are built in Debug mode many times, and in Release mode only a few times. Adding documentation only in Release builds saves some time. Also, the Debug configuration may have conditional compilation blocks which result in object models slightly different from the Release configuration. It is important to document exactly what will be released, rather than debug builds.

4.   Under the Configuration Properties folder in the left pane, select Build.

5.   In the Conditional Compilation Constants textbox, enter TRACE;EXPOSE_BARCODE.

6.   In the XML Documentation File textbox, enter C1.Win.C1BarCode.xml. The Property Pages should now look like the following example.

7.   Click OK to close the Property Pages dialog box.

8.   Select Release from the Solution Configurations drop-down list on the Standard toolbar.

9.   Click Build|Build Solution to build the project. The C1.Win.C1BarCode.xml is created within the bin\Release folder where your project is located.

Using Visual Studio 2005

 

1.   Open the C1BarCode assembly project created in Creating an Assembly if it is not already open.

2.   Select C1BarCode Properties from the Project menu. The Properties page appears.

3.   Select the Build tab.

4.   In the Conditional compilation symbols textbox, enter EXPOSE_BARCODE.

5.   Enter bin\Release\ in the Output path textbox.

Note: The XML documentation option was added to the Release configuration only. This is because most projects are built in Debug mode many times, and in Release mode only a few times. Adding documentation only in Release builds saves some time. Also, the Debug configuration may have conditional compilation blocks which result in object models slightly different from the Release configuration. It is important to document exactly what will be released, rather than debug builds.

6.   Check the XML documentation file checkbox and enter C1.Win.C1BarCode.xml for the file name. The Properties page should now look like the following example.

7.   Click Build|Build C1BarCode to build the project. The C1.Win.C1BarCode.xml is created within the bin\Release\ folder where your project is located.