Compartilhar via


/doc

Processes documentation comments to an XML file.

/doc[+ | -]
' -or-
/doc:file

Arguments

Term

Definition

+ | -

Optional. Specifying +, or just /doc, causes the compiler to generate documentation information and place it in an XML file. Specifying - is the equivalent of not specifying /doc, causing no documentation information to be created.

file

Required if /doc: is used. Specifies the output XML file, which is populated with the comments from the source-code files of the compilation. If the file name contains a space, surround the name with quotation marks (" ").

Comentários

The /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 or /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:

Para usar o arquivo XML gerado com o Visual Studio IntelliSense recurso, deixe o nome de arquivo do arquivo XML a ser o mesmo assembly em que você deseja oferecer suporte. 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 Recomendado marcas XML para comentários da documentação (Visual Basic) 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. For more information, see Introdução ao Project Designer.

  2. Click the Compile tab.

  3. Set the value in the Generate XML documentation file box.

Exemplo

See Documentando Seu Código com XML (Visual Basic) for a sample.

Consulte também

Conceitos

Documentando Seu Código com XML (Visual Basic)

Outros recursos

Compilador do Visual Basic