How to: Generate XML Documentation Files

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

This topic explains how to generate XML documentation files. After you have added XML documentation to the X++ code, you can generate XML documentation files. For information about how to add XML documentation to X++ code, see How to: Add XML Documentation to X++ Source Code.

The documentation file contains the documentation from the header templates in the source code. The reflection file contains reflection information about all the classes, tables, methods, data types, and base enumerations in the current layer. You can generate these XML files for a project or for the entire application. XML files for a project are generated by using a command in Microsoft Dynamics AX. XML files for the entire application are generated by using the command prompt. Generating XML files for the entire application can take a long time, depending on how much documentation has been written in the code.

Generating XML Documentation Files

You can create XML documentation files for a project or for the entire application.

To generate XML documentation files for a project

  1. Open the Projects form by pressing CTRL+SHIFT+P.

  2. Right-click the project for which you want to create XML documentation files, point to Add-Ins, and then click Extract XML documentation.

  3. Select the Documentation check box if you want to create a documentation file for the project.

  4. Select the Reflection check box if you want to create a reflection file for the project.

  5. In the File name fields, specify the destination of each file.

    Note

    The file name should end with the .xml file name extension.

To generate XML documentation files for the entire application

  1. Create a folder in which you will create the XML documentation files. This procedure will reference a folder that has the path, C:\XMLDoc.

    Note

    For security purposes, you may not be able to create XML documentation files directly on the root of a drive.

  2. At the command prompt, execute the following command to create a documentation file for the entire application: Ax32.exe -startupcmd=xmldocumentation_C:\XMLDoc\documentation.xml

  3. At the command prompt, execute the following command to create a reflection file for the entire application: Ax32.exe -startupcmd=xmlreflection_C:\XMLDoc\reflection.xml

    Note

    When you use these commands, Microsoft Dynamics AX will start and create the XML files. Microsoft Dynamics AX will close when it finishes.

See also

XML Documentation

XML Documentation Overview

XML Documentation Tags

How to: Add XML Documentation to X++ Source Code

Walkthrough: Creating XML Documentation in Microsoft Dynamics AX

Best Practices: XML Documentation

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.