首页 > 解决方案 > 这是一个无效的 xsi:type 'http://schemas.microsoft.com/office/taskpaneappversionoverrides:Project'

问题描述

我使用了 yeoman 生成器并使用 Angular 框架构建了MS Project插件。现在我想在 Office 365 管理门户中上传清单,以使其在我们的组织中可用。

当我运行Office toolboxaka时office validator。我收到以下错误并最终出现验证错误。

XML 架构违规:您的清单不符合 Office 加载项清单的当前 XML 架构定义集。- 详细信息:这是一个无效的 xsi:type ' http://schemas.microsoft.com/office/taskpaneappversionoverrides:Project '。

在此处输入图像描述

我尝试使用最新版本的 yo office 生成示例项目,但验证也失败。

yo --version
3.1.0

在这方面需要帮助。

标签: office-addinsyeoman-generatoryeoman-generator-angularoffice-store

解决方案


我已经与 MSFT 支持团队进行了互动。经过长时间的交谈后,我终于发现 yeoman 生成的 XML 在 App 源中不被接受,原因是policy violations and overrides of element used.

下面是 Manifest 如果有人想发布他们的加载项的简单方法。

<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. Add your own below -->
  <Id>your Guid</Id>
  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>1.0.0.0</Version>
  <ProviderName>Your Company name</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="Add-in"/>
  <Description
    DefaultValue="Short Description"/>
  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
  <IconUrl DefaultValue="Iconurl.com"/>
  <HighResolutionIconUrl DefaultValue="Iconurl.com"/>
  <SupportUrl DefaultValue="https://yourcompany.com/help"/>
  <AppDomains>
    <AppDomain>yourcompany.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Project"/>
  </Hosts>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://yourcompany/index.html"/>
  </DefaultSettings>
  <Permissions>ReadWriteDocument</Permissions>
 </OfficeApp>

请阅读评论以更好地理解。希望它会帮助想要将其发布到AppSource的人。谢谢


推荐阅读