我目前正在为我的公司开发 Outlook 插件。我设计了一个清单并主要在桌面上对其进行了测试,但也进行了网络测试。目前,我无法再打开 Outlook Web 的任务窗格之一,并且没有错误、调试或其他日志文件可用。下面是一个示例清单,它在侧载到 Outlook 桌面时正常加载,并且可以打开任务窗格,但在 Outlook Web 上加载,在应用程序列表中可用,但无法打开任务窗格,没有给出错误。我尝试通过 office-addin-debugging 加载它并通过 https://aka.ms/olksideload 手动添加它,两者都具有相同的结果。
浏览器上没有打印相关控制台信息。
有人知道问题所在或解决方法吗?或者调试的方法?
这是桌面上的插件
这是网络上的相同加载项
这是一个可重现的示例
<?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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>666540ce-167f-11ee-be56-0242ac120666</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Contoso Add-in"/>
<Description DefaultValue="An Outlook add-in template to get started."/>
<IconUrl DefaultValue="https://script-lab.azureedge.net/assets/images/icon-64.png" />
<HighResolutionIconUrl DefaultValue="https://script-lab.azureedge.net/assets/images/icon-128.png" />
<SupportUrl DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
<RequestedHeight>450</RequestedHeight>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
<RequestedHeight>450</RequestedHeight>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
</PhoneSettings>
</Form>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
</PhoneSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<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"> -->
<Requirements>
<bt:Sets DefaultMinVersion="1.4">
<bt:Set Name="Mailbox"/>
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<CustomTab id="McFile.Tab2">
<Group id="msgComposeGroup">
<Label resid="GroupLabel" />
<Control xsi:type="Button" id="composeButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url" />
<!-- Enables your add-in to activate without the Reading Pane enabled or a message selected. -->
<!-- <SupportsNoItemContext>true</SupportsNoItemContext> -->
</Action>
</Control>
</Group>
<Label resid="GroupLabel" />
</CustomTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<CustomTab id="McFile.Tab">
<Group id="msgReadGroup">
<Label resid="GroupLabel" />
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url" />
<!-- Enables your add-in to activate without the Reading Pane enabled or a message selected. -->
<!-- <SupportsNoItemContext>true</SupportsNoItemContext> -->
</Action>
</Control>
</Group>
<Label resid="GroupLabel" />
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://script-lab.azureedge.net/assets/images/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://script-lab.azureedge.net/assets/images/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://script-lab.azureedge.net/assets/images/icon-64.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url" DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Contoso"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Open Taskpane"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open a taskpane to show a webpage."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
office-addin-manifest 验证输出
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
- Outlook 2013 or later on Windows
- Outlook 2016 or later on Windows
- Outlook 2019 or later on Windows
- Outlook 2013 or later on Mac
- Outlook 2016 or later on Mac
- Outlook 2019 or later on Mac
- Outlook on the web
- Outlook on Windows (Microsoft 365)
- Outlook on Mac (Microsoft 365)
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://docs.microsoft.com/office/dev/add-ins/overview/office-add-in-availability).
*This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in.
The manifest is valid.
我注意到清单文件中注释了以下标记行:
<!-- <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1"> -->
你需要使用它。请注意,清单可以实现多个版本的
VersionOverrides
元素,支持不同版本的 VersionOverrides
模式。这样做可以选择性地支持较新架构中的新功能,同时仍然支持不支持新功能的旧客户端。
要同时实现
VersionOverrides v1.0
和 v1.1
模式,清单将类似于以下示例。
<OfficeApp ... xsi:type="MailApp">
...
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Description resid="residDescription" />
<Requirements>
<!-- add information on requirements -->
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<!-- add information on form factors -->
</Host>
</Hosts>
<Resources>
<!-- add information on resources -->
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Description resid="residDescription" />
<Requirements>
<!-- add information on requirements -->
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<!-- add information on form factors -->
</Host>
</Hosts>
<Resources>
<!-- add information on resources -->
</Resources>
</VersionOverrides>
</VersionOverrides>
...
</OfficeApp>