首页 文章

'Manifest file doesn' t在上载Outlook加载项清单时符合架构定义

提问于
浏览
1

上载实现add-in commands的Outlook加载项的清单文件时,出现以下错误:

出了问题这个应用程序无法安装 . 清单文件不符合架构定义 . 名称空间“http://schemas.microsoft.com/office/mailappversionoverrides”中的元素“CustomTab”在名称空间“http://schemas.microsoft.com/office/mailappversionoverrides”中具有无效的子元素“Label” . 预期可能元素列表:'命名空间中的组'http://schemas.microsoft.com/office/mailappversionoverrides'...

但是, Label 元素是 CustomTab 元素的有效子元素 . 我该如何解决这个问题?

1 回答

  • 3

    简短回答:确保 Label 元素在 CustomTab 元素中出现 after 所有 Group 元素 .

    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>
    

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

    <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>
    

相关问题