上载Outlook加载项清单时出现“清单文件不符合架构定义”

Jas*_*ton 1 office365 outlook-web-addins

为实现外接程序命令的Outlook外接程序上载清单文件时,出现以下错误:

出了些问题

无法安装此应用。清单文件不符合架构定义。元素“CustomTab”命名空间“ http://schemas.microsoft.com/office/mailappversionoverrides具有无效的子元素命名空间“标签”“ http://schemas.microsoft.com/office/mailappversionoverrides ”。预期的可能元素列表:'名称空间中的组' http://schemas.microsoft.com/office/mailappversionoverrides '...

但是,该Label元素是该元素的有效子代CustomTab。我该如何解决?

Jas*_*ton 5

简短答案:确保该Label元素出现Group元素内的所有元素之后CustomTab

Office 365最近启用了清单文件上的其他架构验证,并且由于为CustomTab元素定义架构的方式,它有望Label实现。

换句话说,带有此CustomTab元素的清单将触发错误:

<CustomTab id="TabCustom1">
  <Label resid="customTabLabel1"/>
  <Group id="group1">
    <Label resid="groupLabel1"/>
    <Control xsi:type="Button" id="uilessButton1">
      <Label resid="uilessButtonLabel1"/>
      <Supertip>
        <Title resid="uilessButtonSuperTipTitle1"/>
        <Description resid="uilessButtonSuperTipDesc1"/>
      </Supertip>
      <Icon>
        <bt:Image size="16" resid="uilessButtonIcon1-16"/>
        <bt:Image size="32" resid="uilessButtonIcon1-32"/>
        <bt:Image size="80" resid="uilessButtonIcon1-80"/>
      </Icon>
      <Action xsi:type="ExecuteFunction">
        <FunctionName>buttonFunction1</FunctionName>
      </Action>
    </Control>
  </Group>
</CustomTab>
Run Code Online (Sandbox Code Playgroud)

将其更改为此将解决错误:

<CustomTab id="TabCustom1">
  <Group id="group1">
    <Label resid="groupLabel1"/>
    <Control xsi:type="Button" id="uilessButton1">
      <Label resid="uilessButtonLabel1"/>
      <Supertip>
        <Title resid="uilessButtonSuperTipTitle1"/>
        <Description resid="uilessButtonSuperTipDesc1"/>
      </Supertip>
      <Icon>
        <bt:Image size="16" resid="uilessButtonIcon1-16"/>
        <bt:Image size="32" resid="uilessButtonIcon1-32"/>
        <bt:Image size="80" resid="uilessButtonIcon1-80"/>
      </Icon>
      <Action xsi:type="ExecuteFunction">
        <FunctionName>buttonFunction1</FunctionName>
      </Action>
    </Control>
  </Group>
  <Label resid="customTabLabel1"/>
</CustomTab>
Run Code Online (Sandbox Code Playgroud)