office-addin-manifest
This package provides the ability to parse, display, modify, and validate the manifest file for Office Add-ins.
link - npmjs.com/package/office-addin-manifest
link - github.com/OfficeDev/Office-Addin-Scripts/tree/master/packages/office-addin-manifest
Installation
Install the module by running the following command.
npm install -g office-addin-manifest
Validation
office-addin-manifest validate <manifest>
Yeoman Generator
If you used the Yeoman Generator to create your Office Add-in it will come with a validation module.
Your add-in project must have been created by using Yeoman generator for Office Add-ins version 1.1.17 or later.
Your add-in project must have been created later than October 2018.
When you use the Yeoman Generator to create an Office Add-in project a lot of dependecies will be installed.
The package.json file will contain the following entries:
{
"name": "office-addin-taskpane.js",
"version": "0.0.1",
"scripts": {
"validate": "office-addin-manifest validate manifest.xml",
},
devDependencies": {
"office-addin-manifest": "1.5.0",
}
}
Run the following command in the root directory of your project:
npm run validate
XSD Validation
You can also validate a manifest file against the XML Schema Definition (XSD) file directly.
This includes checking all the namespaces.
Install tar and libxml
xmllint --noout --schema XSD_FILE XML_FILE
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext