1

我的清单中有以下行

<IconUrl DefaultValue="images/icon-32.png"/>

并且

<Host ...>
...
    <Control ...>
        ....
        <Icon>
            <bt:Image size="16" DefaultValue="images/icon-16.png"/>
            <bt:Image size="32" DefaultValue="images/icon-32.png"/>
            <bt:Image size="80" DefaultValue="images/icon-80.png"/>
        </Icon>
    </Control>

</Host>

但是当我提交审批时,我从 Office 商店团队收到以下错误。

The icon referenced in the IconUrl element of your add-in manifest must be 32x32 pixels in dimension.

并参考文档验证策略5.10

我已经验证了图像的大小正好是 PNG 格式的 32x32 像素。在测试加载项时,icon-32.png 被加载到Home menu panel

更新下面添加完整的清单文件

<?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" 
    xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
    xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
    <Id>aabbccdd-aabbccdd-aabbccdd-aabbccdd</Id>
    <Version>1.0</Version>
    <ProviderName>TestAddin</ProviderName>
    <DefaultLocale>en-US</DefaultLocale>
    <DisplayName DefaultValue="TestAddin" />
    <Description DefaultValue="A Test addin"/>
    <IconUrl DefaultValue="https://wireframepro.mockflow.com/integrations/office365/images/icon-32.png" />
    <SupportUrl DefaultValue="http://tesaddin.local" />
    <AppDomains>
        <AppDomain>http://tesaddin.local/</AppDomain>
    </AppDomains>
    <Hosts>
        <Host Name="Document" />
    </Hosts>
    <DefaultSettings>
        <SourceLocation DefaultValue="http://tesaddin.local/index.html" />
    </DefaultSettings>
    <Permissions>ReadWriteDocument</Permissions>
    <Requirements>
        <Sets DefaultMinVersion="1.1">
            <Set Name="WordApi" MinVersion="1.1"/>
        </Sets>
    </Requirements>
    <VersionOverrides 
        xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
        <Hosts>
            <Host xsi:type="Document">
                <DesktopFormFactor>
                    <GetStarted>
                        <Title resid="ACME.GetStarted.Title"/>
                        <Description resid="ACME.GetStarted.Description"/>
                        <LearnMoreUrl resid="ACME.GetStarted.LearnMoreUrl"/>
                    </GetStarted>
                    <ExtensionPoint xsi:type="PrimaryCommandSurface">
                        <OfficeTab id="TabHome">
                            <Group id="ACME.Group1">
                                <Label resid="ACME.Group1Label" />
                                <Icon>
                                    <bt:Image size="16" resid="ACME.tpicon_16x16" />
                                    <bt:Image size="32" resid="ACME.tpicon_32x32" />
                                    <bt:Image size="80" resid="ACME.tpicon_80x80" />
                                </Icon>
                                <Control xsi:type="Button" id="ACME.TaskpaneButton">
                                    <Label resid="ACME.TaskpaneButton.Label" />
                                    <Supertip>
                                        <Title resid="ACME.TaskpaneButton.Label" />
                                        <Description resid="ACME.TaskpaneButton.Tooltip" />
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="ACME.tpicon_16x16" />
                                        <bt:Image size="32" resid="ACME.tpicon_32x32" />
                                        <bt:Image size="80" resid="ACME.tpicon_80x80" />
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <TaskpaneId>ButtonId1</TaskpaneId>
                                        <SourceLocation resid="ACME.Taskpane.Url" />
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                </DesktopFormFactor>
            </Host>
        </Hosts>
        <Resources>
            <bt:Images>
                <bt:Image id="ACME.tpicon_16x16" DefaultValue="https://wireframepro.mockflow.com/integrations/office365/images/icon-16.png" />
                <bt:Image id="ACME.tpicon_32x32" DefaultValue="https://wireframepro.mockflow.com/integrations/office365/images/icon-32.png" />
                <bt:Image id="ACME.tpicon_80x80" DefaultValue="https://wireframepro.mockflow.com/integrations/office365/images/icon-80.png" />
            </bt:Images>
            <bt:Urls>
                <bt:Url id="ACME.Taskpane.Url" DefaultValue="http://tesaddin.local/index.html" />
                <bt:Url id="ACME.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
            </bt:Urls>
            <bt:ShortStrings>
                <bt:String id="ACME.TaskpaneButton.Label" DefaultValue="Open Editor" />
                <bt:String id="ACME.Group1Label" DefaultValue="Test Addin" />
                <bt:String id="ACME.GetStarted.Title" DefaultValue="Get started with Test Addin" />
            </bt:ShortStrings>
            <bt:LongStrings>
                <bt:String id="ACME.TaskpaneButton.Tooltip" DefaultValue="Open Editor" />
                <bt:String id="ACME.GetStarted.Description" DefaultValue="Test add-in has been loaded succesfully. You can access the editor in HOME tab, click Open Editor" />
            </bt:LongStrings>
        </Resources>
    </VersionOverrides>
</OfficeApp>
4

1 回答 1

1

我确认您引用的图像IconUrl是 32x32。根据您发布的内容,我认为您的图像没有问题。我建议重新提交并提及您无法从之前的失败中复制图标问题。

您的清单存在一些问题,您应该首先解决:

  1. requirements元素应该紧跟在你的元素之后hosts。虽然这不应该影响加载项,但它会触发自动验证脚本。只需将其移到之后即可hosts消除在清单验证期间被错误标记的情况。

  2. 你有几个参考http://tesaddin.local/index.html。加载项需要通过安全传输 ( https) 运行。清单中唯一应该使用的 URIhttp是 XML 模式引用。鉴于.local,我认为这只是在 SO 上发布的常设 URL,因此这在您的实际清单中可能不是问题。

于 2017-10-01T19:09:10.997 回答