出现错误“发生内部服务器错误。操作失败。对象引用未设置到对象的实例。”安装清单时。
没有 VersionOverridesV1_0 清单可以正常工作。
<?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"
xsi:type="MailApp">
<Id>9DA3075A-F1BB-41A6-BE75-2FC326FA31F4</Id>
<Version>1.0.0.0</Version>
<ProviderName>Federated Directory</ProviderName>
<DefaultLocale>en-us</DefaultLocale>
<DisplayName DefaultValue="LocalFederatedDirectory Contacts"/>
<Description DefaultValue="Search and use contacts from FederatedDirectory"/>
<IconUrl DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-64x64.png"/>
<HighResolutionIconUrl DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-128x128.png"/>
<SupportUrl DefaultValue="https://help.federated.directory"/>
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="Mailbox" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue=
"https://local.federated.directory:4200/owa/index.html" />
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="ReadOrEdit" />
<Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" />
</Rule>
<!-- https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/versionoverrides -->
<VersionOverrides
xmlns="http://schemas.microsoft.com/office/mailappversionoverrides"
xsi:type="VersionOverridesV1_0"
>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Button for appointment view -->
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabDefault">
<Group id="appointmentComposeCmdGroup">
<Label resid="residGroupLabel"/>
<Control xsi:type="Button" id="appointmentButton2Id1">
<Label resid="buttonLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residSupertipLabel" />
<Description resid="residToolTip" />
</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" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Button for edit view -->
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgComposeCmdGroup">
<Label resid="residGroupLabel"/>
<Control xsi:type="Button" id="msgEditButton2Id1">
<Label resid="buttonLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residSupertipLabel" />
<Description resid="residToolTip" />
</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" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Button for read view -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadCmdGroup">
<Label resid="residGroupLabel"/>
<Control xsi:type="Button" id="msgReadButton2Id1">
<Label resid="buttonLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residSupertipLabel" />
<Description resid="residToolTip" />
</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" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-16x16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-32x32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url" DefaultValue="https://local.federated.directory:4200/owa/index.html"/>
</bt:Urls>
<bt:ShortStrings>
<!-- Label under button -->
<bt:String id="residGroupLabel" DefaultValue="Federated Directory"/>
<!-- button label -->
<bt:String id="buttonLabel" DefaultValue="Search contacts"/>
<!-- tooltip when hover control button -->
<bt:String id="residSupertipLabel" DefaultValue="Federated Directory"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="residToolTip" DefaultValue="Search and use contacts from Federated Directory"/>
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Hosts>
<Host xsi:type="MailHost">
<MobileFormFactor>
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="msgReadCmdGroupMobileV1_1">
<Label resid="residGroupLabelV1_1"/>
<Control xsi:type="MobileButton" id="msgReadButtonMobile2Id1V1_1">
<Label resid="buttonLabelV1_1" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="Icon.25x25.V1_1"/>
<bt:Image size="25" scale="2" resid="Icon.25x25.V1_1"/>
<bt:Image size="25" scale="3" resid="Icon.25x25.V1_1"/>
<bt:Image size="32" scale="1" resid="Icon.32x32.V1_1"/>
<bt:Image size="32" scale="2" resid="Icon.32x32.V1_1"/>
<bt:Image size="32" scale="3" resid="Icon.32x32.V1_1"/>
<bt:Image size="48" scale="1" resid="Icon.48x48.V1_1"/>
<bt:Image size="48" scale="2" resid="Icon.48x48.V1_1"/>
<bt:Image size="48" scale="3" resid="Icon.48x48.V1_1"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url.V1_1" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-16x16.png"/>
<bt:Image id="Icon.25x25.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-25x25.png"/>
<bt:Image id="Icon.32x32.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-32x32.png"/>
<bt:Image id="Icon.48x48.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-48x48.png"/>
<bt:Image id="Icon.80x80.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url.V1_1" DefaultValue="https://local.federated.directory:4200/owa/index.html"/>
</bt:Urls>
<bt:ShortStrings>
<!-- Label under button -->
<bt:String id="residGroupLabelV1_1" DefaultValue="Federated Directory"/>
<!-- button label -->
<bt:String id="buttonLabelV1_1" DefaultValue="Search contacts"/>
<!-- tooltip when hover control button -->
<bt:String id="residSupertipLabelV1_1" DefaultValue="Federated Directory"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="residToolTipV1_1" DefaultValue="Search and use contacts from Federated Directory"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
尝试过此响应 - 无法安装具有移动支持的 Outlook 插件清单
尝试了清单 npx 验证工具,如下所述 - https://learn.microsoft.com/en-us/office/dev/add-ins/testing/troubleshoot-manifest 并表示清单有效。
如果有人觉得这有用,我已经找到了解决方案。
在版本覆盖 1_1 中复制 DesktopFormFactor 非常重要。如果它位于根 VersionOverridesV1_0 中但不在 VersionOverridesV1_1 中,则会抛出“内部服务器”。
其次,也很重要,需要更改 DesktopFormFactor 的重复部分中的所有 id,否则清单验证工具会尖叫,版本覆盖 1_1 中不允许 DesktopFormfactor。
我的最终 xml 在这里:
<?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"
xsi:type="MailApp">
<Id>9DA3075A-F1BB-41A6-BE75-2FC326FA31F4</Id>
<Version>1.0.0.0</Version>
<ProviderName>Federated Directory</ProviderName>
<DefaultLocale>en-us</DefaultLocale>
<DisplayName DefaultValue="LocalFederatedDirectory Contacts"/>
<Description DefaultValue="Search and use contacts from FederatedDirectory"/>
<IconUrl DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-64x64.png"/>
<HighResolutionIconUrl DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-128x128.png"/>
<SupportUrl DefaultValue="https://help.federated.directory"/>
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="Mailbox" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue=
"https://local.federated.directory:4200/owa/index.html" />
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="ReadOrEdit" />
<Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" />
</Rule>
<!-- https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/versionoverrides -->
<VersionOverrides
xmlns="http://schemas.microsoft.com/office/mailappversionoverrides"
xsi:type="VersionOverridesV1_0"
>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Button for appointment view -->
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabDefault">
<Group id="appointmentComposeCmdGroup">
<Label resid="residGroupLabel"/>
<Control xsi:type="Button" id="appointmentButton2Id1">
<Label resid="buttonLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residSupertipLabel" />
<Description resid="residToolTip" />
</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" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Button for edit view -->
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgComposeCmdGroup">
<Label resid="residGroupLabel"/>
<Control xsi:type="Button" id="msgEditButton2Id1">
<Label resid="buttonLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residSupertipLabel" />
<Description resid="residToolTip" />
</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" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Button for read view -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadCmdGroup">
<Label resid="residGroupLabel"/>
<Control xsi:type="Button" id="msgReadButton2Id1">
<Label resid="buttonLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residSupertipLabel" />
<Description resid="residToolTip" />
</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" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-16x16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-32x32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url" DefaultValue="https://local.federated.directory:4200/owa/index.html"/>
</bt:Urls>
<bt:ShortStrings>
<!-- Label under button -->
<bt:String id="residGroupLabel" DefaultValue="Federated Directory"/>
<!-- button label -->
<bt:String id="buttonLabel" DefaultValue="Search contacts"/>
<!-- tooltip when hover control button -->
<bt:String id="residSupertipLabel" DefaultValue="Federated Directory"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="residToolTip" DefaultValue="Search and use contacts from Federated Directory"/>
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Button for appointment view -->
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<OfficeTab id="TabAppointmenttV1_1">
<Group id="appointmentComposeCmdGroupV1_1">
<Label resid="residGroupLabelV1_1"/>
<Control xsi:type="Button" id="appointmentButton2Id1V1_1">
<Label resid="buttonLabelV1_1" />
<Tooltip resid="residToolTipV1_1" />
<Supertip>
<Title resid="residSupertipLabelV1_1" />
<Description resid="residToolTipV1_1" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16.V1_1"/>
<bt:Image size="32" resid="Icon.32x32.V1_1"/>
<bt:Image size="80" resid="Icon.80x80.V1_1"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url.V1_1" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Button for edit view -->
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabComposeV1_1">
<Group id="msgComposeCmdGroupV1_1">
<Label resid="residGroupLabelV1_1"/>
<Control xsi:type="Button" id="msgEditButton2Id1V1_1">
<Label resid="buttonLabelV1_1" />
<Tooltip resid="residToolTipV1_1" />
<Supertip>
<Title resid="residSupertipLabelV1_1" />
<Description resid="residToolTipV1_1" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16.V1_1"/>
<bt:Image size="32" resid="Icon.32x32.V1_1"/>
<bt:Image size="80" resid="Icon.80x80.V1_1"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url.V1_1" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Button for read view -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabReadV1_1">
<Group id="msgReadCmdGroupV1_1">
<Label resid="residGroupLabelV1_1"/>
<Control xsi:type="Button" id="msgReadButton2Id1V1_1">
<Label resid="buttonLabelV1_1" />
<Tooltip resid="residToolTipV1_1" />
<Supertip>
<Title resid="residSupertipLabelV1_1" />
<Description resid="residToolTipV1_1" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16.V1_1"/>
<bt:Image size="32" resid="Icon.32x32.V1_1"/>
<bt:Image size="80" resid="Icon.80x80.V1_1"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url.V1_1" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
<MobileFormFactor>
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="msgReadCmdGroupMobileV1_1">
<Label resid="residGroupLabelV1_1"/>
<Control xsi:type="MobileButton" id="msgReadButtonMobile2Id1V1_1">
<Label resid="buttonLabelV1_1" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="Icon.25x25.V1_1"/>
<bt:Image size="25" scale="2" resid="Icon.25x25.V1_1"/>
<bt:Image size="25" scale="3" resid="Icon.25x25.V1_1"/>
<bt:Image size="32" scale="1" resid="Icon.32x32.V1_1"/>
<bt:Image size="32" scale="2" resid="Icon.32x32.V1_1"/>
<bt:Image size="32" scale="3" resid="Icon.32x32.V1_1"/>
<bt:Image size="48" scale="1" resid="Icon.48x48.V1_1"/>
<bt:Image size="48" scale="2" resid="Icon.48x48.V1_1"/>
<bt:Image size="48" scale="3" resid="Icon.48x48.V1_1"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url.V1_1" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-16x16.png"/>
<bt:Image id="Icon.25x25.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-25x25.png"/>
<bt:Image id="Icon.32x32.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-32x32.png"/>
<bt:Image id="Icon.48x48.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-48x48.png"/>
<bt:Image id="Icon.80x80.V1_1" DefaultValue="https://local.federated.directory:4200/assets/main-icons/icon-80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url.V1_1" DefaultValue="https://local.federated.directory:4200/owa/index.html"/>
</bt:Urls>
<bt:ShortStrings>
<!-- Label under button -->
<bt:String id="residGroupLabelV1_1" DefaultValue="Federated Directory"/>
<!-- button label -->
<bt:String id="buttonLabelV1_1" DefaultValue="Search contacts"/>
<!-- tooltip when hover control button -->
<bt:String id="residSupertipLabelV1_1" DefaultValue="Federated Directory"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="residToolTipV1_1" DefaultValue="Search and use contacts from Federated Directory"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>