在 Outlook 中使用模块扩展
Using module extension in Outlook
我正在创建 Outlook 加载项,我想试用新的模块扩展。但是,按照以下示例:https://dev.office.com/docs/add-ins/outlook/extension-module-outlook-add-ins,创建清单时出现错误。
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
...
</VersionOverrides>
</VersionOverrides>
错误发生在第二个 VersionOverrides 上,消息为:
"The element 'VersionOverrides' in namespace 'http: // schemas microsoft com/office/mailappversionoverrides' has invalid child element 'VersionOverrides' in namespace 'http:// schemas microsoft com/office/mailappversionoverrides/1.1'. List of possible elements expected: 'Description, Requirements, Hosts' in namespace 'http:// schemas microsoft com/office/mailappversionoverrides'."
因为我不能 post 超过 2 个链接,所以我已经替换了 .在带空格的 URL 中。
我觉得在 versionoverride 中包含 versionoverride 似乎很奇怪,但如果我以任何方式更改第一个版本,VS 将不会接受它,因为它遵循模式。同样,如果我不包括第二个 versionoverride,VS 会给出以下错误:
"This is an invalid xsi:type 'http:// schemas microsoft com/office/mailappversionoverrides:Module'."
清单的其余部分几乎与 officeDev 中的示例对称,除了 Title 和 Id 等元素。
我做错了什么?
就我个人而言,我不再使用来自 Visual Studio 的 XSD 验证和 Addin 清单。但是您应该做的是更新 XSD 文件以进行 XML 模式验证以支持新版本覆盖。检查以下资源:
- How to Select the XML Schemas to Use on MSDN
- XML Validation with XSD in Visual Studio IDE on SO
- Update the version of your JavaScript API for Office and manifest schema files on GitHub
此外,在使用模块时您应该注意the following situation。
这是另一个 example on GitHub 模块声明。
您不需要 Visual Studio 来构建加载项清单。清单是一个简单的 XML 文件,您也可以在记事本中创建该文件,并且只需从管理集成(以前称为管理加载项)页面上传即可。
VS XSD 可能未更新以支持 VO1.1。您可以在 VS 中创建 XML 而不必担心由于其 XSD 验证而导致的 VersionOverride 错误。
只需继续并使用 从文件添加 选项从管理集成安装 XML,您应该会很好去吧!
我正在创建 Outlook 加载项,我想试用新的模块扩展。但是,按照以下示例:https://dev.office.com/docs/add-ins/outlook/extension-module-outlook-add-ins,创建清单时出现错误。
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
...
</VersionOverrides>
</VersionOverrides>
错误发生在第二个 VersionOverrides 上,消息为:
"The element 'VersionOverrides' in namespace 'http: // schemas microsoft com/office/mailappversionoverrides' has invalid child element 'VersionOverrides' in namespace 'http:// schemas microsoft com/office/mailappversionoverrides/1.1'. List of possible elements expected: 'Description, Requirements, Hosts' in namespace 'http:// schemas microsoft com/office/mailappversionoverrides'."
因为我不能 post 超过 2 个链接,所以我已经替换了 .在带空格的 URL 中。
我觉得在 versionoverride 中包含 versionoverride 似乎很奇怪,但如果我以任何方式更改第一个版本,VS 将不会接受它,因为它遵循模式。同样,如果我不包括第二个 versionoverride,VS 会给出以下错误:
"This is an invalid xsi:type 'http:// schemas microsoft com/office/mailappversionoverrides:Module'."
清单的其余部分几乎与 officeDev 中的示例对称,除了 Title 和 Id 等元素。
我做错了什么?
就我个人而言,我不再使用来自 Visual Studio 的 XSD 验证和 Addin 清单。但是您应该做的是更新 XSD 文件以进行 XML 模式验证以支持新版本覆盖。检查以下资源:
- How to Select the XML Schemas to Use on MSDN
- XML Validation with XSD in Visual Studio IDE on SO
- Update the version of your JavaScript API for Office and manifest schema files on GitHub
此外,在使用模块时您应该注意the following situation。 这是另一个 example on GitHub 模块声明。
您不需要 Visual Studio 来构建加载项清单。清单是一个简单的 XML 文件,您也可以在记事本中创建该文件,并且只需从管理集成(以前称为管理加载项)页面上传即可。
VS XSD 可能未更新以支持 VO1.1。您可以在 VS 中创建 XML 而不必担心由于其 XSD 验证而导致的 VersionOverride 错误。
只需继续并使用 从文件添加 选项从管理集成安装 XML,您应该会很好去吧!