Processes documentation comments to an XML file.
-doc[+ | -] ' -or- -doc:file
||Optional. Specifying +, or just
-doc option controls whether the compiler generates an XML file containing the documentation comments. If you use the
-doc:file syntax, the
file parameter specifies the name of the XML file. If you use
-doc+, the compiler takes the XML file name from the executable file or library that the compiler is creating. If you use
-doc- or do not specify the
-doc option, the compiler does not create an XML file.
In source-code files, documentation comments can precede the following definitions:
To use the generated XML file with the Visual Studio IntelliSense feature, let the file name of the XML file be the same as the assembly you want to support. Make sure the XML file is in the same directory as the assembly so that when the assembly is referenced in the Visual Studio project, the .xml file is found as well. XML documentation files are not required for IntelliSense to work for code within a project or within projects referenced by a project.
Unless you compile with
/target:module, the XML file contains the tags
<assembly></assembly>. These tags specify the name of the file containing the assembly manifest for the output file of the compilation.
See XML Comment Tags for ways to generate documentation from comments in your code.
|To set -doc in the Visual Studio integrated development environment|
|1. Have a project selected in Solution Explorer. On the Project menu, click Properties.
2. Click the Compile tab.
3. Set the value in the Generate XML documentation file box.
See Documenting Your Code with XML for a sample.