9.3. Using XML Comments
Once you have the XML comments inline with your code, you'll most likely want to generate an XML file containing the documentation. In Visual Basic this setting is on by default, with an output path and filename specified with default values. However, C# has the option turned off as its default behavior, so if you want documentation you'll need to turn it on manually.
To ensure that your documentation is being generated where you require, open the property pages for the project through the Solution Explorer's right-click context menu. Locate the project for which you want documentation, right-click its entry in the Solution Explorer, and select Properties. Alternatively, in Visual Basic you can simply double-click the My Project entry in the Solution Explorer.
The XML documentation options are located in the Build section (see Figure 9-2). Below the general build options is an Output section that contains a checkbox that enables XML-documentation file generation. When this checkbox is enabled, the text field next to it becomes available for you to specify the filename for the XML file that will be generated.
Figure 9.2. Figure 9-2
Once you've saved these options, the next time you perform a build, Visual Studio will add the /doc compiler option to the process so that the XML documentation is generated as specified.
The XML file that is generated will contain ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access