Share via


/doc (Process Documentation Comments) (C/C++)

Causes the compiler to process documentation comments in source code files and to create an .xdc file for each source code file that has documentation comments.

/doc[name]

Arguments

  • name
    The name of the .xdc file that the compiler will create. Only valid when one .cpp file is passed in the compilation.

Remarks

The .xdc files are processed into an .xml file with xdcmake.exe. For more information, see XDCMake Reference.

You can add documentation comments to your source code files. For more information, see Recommended Tags for Documentation Comments (Visual C++).

/doc is not compatible with /clr:oldSyntax. See /clr (Common Language Runtime Compilation) for more information.

To use the generated .xml file with IntelliSense, make the file name of the .xml file the same as the assembly that you want to support and put the .xml file is in the same directory as the assembly. When the assembly is referenced in the Visual Studio project, the .xml file is also found. For more information, see Using IntelliSense and Supplying XML Code Comments.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Expand the Configuration Properties node.

  3. Expand the C/C++ node.

  4. Select the Output Files property page.

  5. Modify the Generate XML Documentation Files property.

To set this linker option programmatically

See Also

Reference

Compiler Options

Setting Compiler Options