/doc (Process Documentation Comments) (C/C++)
The latest version of this topic can be found at -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.
The name of the .xdc file that the compiler will create. Only valid when one .cpp file is passed in the compilation.
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.
/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
Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.
Expand the Configuration Properties node.
Expand the C/C++ node.
Select the Output Files property page.
Modify the Generate XML Documentation Files property.