# -doc (C# Compiler Options)

The -doc option allows you to place documentation comments in an XML file.

## Syntax

-doc:file


## Arguments

file
The output file for XML, which is populated with the comments in the source code files of the compilation.

## Remarks

In source code files, documentation comments that precede the following can be processed and added to the XML file:

The source code file that contains Main is output first into the XML.

To use the generated .xml file for use with the IntelliSense feature, let the file name of the .xml file be the same as the assembly you want to support and then make sure the .xml file is in the same directory as the assembly. Thus, when the assembly is referenced in the Visual Studio project, the .xml file is found as well. See Supplying Code Comments and for more information.

Unless you compile with -target:module, file will contain <assembly></assembly> tags specifying the name of the file containing the assembly manifest for the output file of the compilation.

Note

The -doc option applies to all input files; or, if set in the Project Settings, all files in the project. To disable warnings related to documentation comments for a specific file or section of code, use #pragma warning.