Validate an Office Add-in's manifest

You may want to validate your add-in's manifest file to ensure that it's correct and complete. Validation can also identify issues that are causing the error "Your add-in manifest is not valid" when you attempt to sideload your add-in. This article describes multiple ways to validate the manifest file.

Note

For details about using runtime logging to troubleshoot issues with your add-in's manifest, see Debug your add-in with runtime logging.

Validate your manifest with the Yeoman generator for Office Add-ins

If you used the Yeoman generator for Office Add-ins to create your add-in, you can also use it to validate your project's manifest file. Run the following command in the root directory of your project:

npm run validate

Animated gif that shows the Yo Office validator being run at the command line and generating results that show Validation Passed

Note

To have access to this functionality, your add-in project must have been created by using Yeoman generator for Office Add-ins version 1.1.17 or later.

Validate your manifest with office-addin-manifest

If you didn't use the Yeoman generator for Office Add-ins to create your add-in, you can validate the manifest by using office-addin-manifest.

  1. Install Node.js.

  2. Run the following command in the root directory of your project.

    npm run validate
    

    Note

    If this command is not available or not working, run the following command instead to force the use of the latest version of the office-addin-manifest tool (replacing MANIFEST_FILE with the name of the manifest file):

    npx --ignore-existing office-addin-manifest validate MANIFEST_FILE
    

Validate your manifest against the XML schema

You can validate the manifest file against the XML Schema Definition (XSD) files. This will ensure that the manifest file follows the correct schema, including any namespaces for the elements you are using. If you copied elements from other sample manifests double check that you also include the appropriate namespaces. You can use an XML schema validation tool to perform this validation.

To use a command-line XML schema validation tool to validate your manifest

  1. Install tar and libxml, if you haven't already.

  2. Run the following command. Replace XSD_FILE with the path to the manifest XSD file, and replace XML_FILE with the path to the manifest XML file.

    xmllint --noout --schema XSD_FILE XML_FILE
    

See also