为什么这个 xml 文件不能用 MobileFormFactor for office addin 工作
Why won't this xml file with MobileFormFactor for office addin work
我正在尝试按照几个在线示例将移动任务窗格添加到我的 Office 加载项应用程序,但现在似乎卡在了这个错误上。出了什么问题。 "installation failed: versionoverrides 1.0 secon of the manifest is invalid. The MobileFormFactor tag is invalid"
我用来制作图案的指南是 https://github.com/OfficeDev/outlook-add-in-command-demo/blob/master/command-demo-manifest.xml
如果我删除内部 VersionOverrides 标签,这将正常安装。
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>some-id</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Red Planet</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Red Planet special" />
<Description DefaultValue="Red Planet Outlook special Support" />
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://somedomain/assets/icon.png" />
<HighResolutionIconUrl DefaultValue="https://somedomain/assets/icon.png" />
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!-- <SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" /> -->
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://somedomain</AppDomain>
<AppDomain>https://somedomain</AppDomain>
<!-- <AppDomain>AppDomain3</AppDomain> -->
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://somedomain/index.html" />
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</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">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="fnFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault2">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup2">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton2">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon32" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon80" DefaultValue="https://somedomain/assets/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://somedomain/#functions" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://somedomain/#task-pane" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Red Planet" />
<bt:String id="customTabLabel" DefaultValue="Red Planet Tab" />
<bt:String id="paneReadButtonLabel" DefaultValue="special Reply" />
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties" />
<bt:String id="groupLabel2" DefaultValue="Red Planet2" />
<bt:String id="customTabLabel2" DefaultValue="Red Planet Tab2" />
<bt:String id="paneReadButtonLabel2" DefaultValue="special Reply2" />
<bt:String id="paneReadSuperTipTitle2" DefaultValue="Get all properties2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<MobileFormFactor>
<FunctionFile resid="fnFile" />
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="mobileGroupID">
<Label resid="residAppName" />
<Control xsi:type="MobileButton" id="TaskPaneBtn">
<Label resid="residTaskPaneButtonName" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="icon16" />
<bt:Image size="25" scale="2" resid="icon16" />
<bt:Image size="25" scale="3" resid="icon16" />
<bt:Image size="32" scale="1" resid="icon16" />
<bt:Image size="32" scale="2" resid="icon16" />
<bt:Image size="32" scale="3" resid="icon16" />
<bt:Image size="48" scale="1" resid="icon16" />
<bt:Image size="48" scale="2" resid="icon16" />
<bt:Image size="48" scale="3" resid="icon16" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon32" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon80" DefaultValue="https://somedomain/assets/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://somedomain/#functions" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://somedomain/#task-pane" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="residTaskPaneButtonName" DefaultValue="Mobile test" />
<bt:String id="residAppName" DefaultValue="Mobile Testing" />
<bt:String id="residTaskpaneUrl" DefaultValue="Mobile test2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
仅当 VersionOverrides 的 xsi:type 属性值为 VersionOverridesV1_1 时才能指定 MobileFormFactor。
您也可以参考this了解更多信息
您发布的清单中存在几个问题...
VersionOverridesV1_0
(1.5) 部分的 DefaultMinVersion
不能高于 VersionOverridesV1_1
(1.3) 中指定的值。
Url
资源应该指向 .html
文件,包括 FunctionFile
.
VersionOverridesV1_1
部分不从 VersionOverridesV1_0
部分获取任何内容,您必须重复 ExtensionPoint
并在 VersionOverridesV1_1
中适当地 Resources
。
当您修复上面的所有问题时,清单应该如下所示 XML 并且可以使用...
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>your_id</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Red Planet</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Red Planet special" />
<Description DefaultValue="Red Planet Outlook special Support" />
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:44300/Images/app-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:44300/Images/app-80.png" />
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!-- <SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" /> -->
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://somedomain.com</AppDomain>
<AppDomain>https://somedomain.com</AppDomain>
<!-- <AppDomain>AppDomain3</AppDomain> -->
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:44300/index.html" />
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</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">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="fnFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault2">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup2">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton2">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://localhost:44300/Images/app-16.png" />
<bt:Image id="icon32" DefaultValue="https://localhost:44300/Images/app-32.png" />
<bt:Image id="icon80" DefaultValue="https://localhost:44300/Images/app-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://localhost:44300/functions.html" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44300/task-pane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Red Planet" />
<bt:String id="customTabLabel" DefaultValue="Red Planet Tab" />
<bt:String id="paneReadButtonLabel" DefaultValue="special Reply" />
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties" />
<bt:String id="groupLabel2" DefaultValue="Red Planet2" />
<bt:String id="customTabLabel2" DefaultValue="Red Planet Tab2" />
<bt:String id="paneReadButtonLabel2" DefaultValue="special Reply2" />
<bt:String id="paneReadSuperTipTitle2" DefaultValue="Get all properties2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="fnFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault2">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup2">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton2">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
<MobileFormFactor>
<FunctionFile resid="fnFile" />
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="mobileGroupID">
<Label resid="residAppName" />
<Control xsi:type="MobileButton" id="TaskPaneBtn">
<Label resid="residTaskPaneButtonName" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="icon16" />
<bt:Image size="25" scale="2" resid="icon16" />
<bt:Image size="25" scale="3" resid="icon16" />
<bt:Image size="32" scale="1" resid="icon16" />
<bt:Image size="32" scale="2" resid="icon16" />
<bt:Image size="32" scale="3" resid="icon16" />
<bt:Image size="48" scale="1" resid="icon16" />
<bt:Image size="48" scale="2" resid="icon16" />
<bt:Image size="48" scale="3" resid="icon16" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://localhost:44300/Images/app-16.png" />
<bt:Image id="icon32" DefaultValue="https://localhost:44300/Images/app-32.png" />
<bt:Image id="icon80" DefaultValue="https://localhost:44300/Images/app-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://localhost:44300/functions.html" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44300/task-pane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Red Planet" />
<bt:String id="customTabLabel" DefaultValue="Red Planet Tab" />
<bt:String id="paneReadButtonLabel" DefaultValue="special Reply" />
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties" />
<bt:String id="groupLabel2" DefaultValue="Red Planet2" />
<bt:String id="customTabLabel2" DefaultValue="Red Planet Tab2" />
<bt:String id="paneReadButtonLabel2" DefaultValue="special Reply2" />
<bt:String id="paneReadSuperTipTitle2" DefaultValue="Get all properties2" />
<bt:String id="residTaskPaneButtonName" DefaultValue="Mobile test" />
<bt:String id="residAppName" DefaultValue="Mobile Testing" />
<bt:String id="residTaskpaneUrl" DefaultValue="Mobile test2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
我正在尝试按照几个在线示例将移动任务窗格添加到我的 Office 加载项应用程序,但现在似乎卡在了这个错误上。出了什么问题。 "installation failed: versionoverrides 1.0 secon of the manifest is invalid. The MobileFormFactor tag is invalid"
我用来制作图案的指南是 https://github.com/OfficeDev/outlook-add-in-command-demo/blob/master/command-demo-manifest.xml
如果我删除内部 VersionOverrides 标签,这将正常安装。
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>some-id</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Red Planet</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Red Planet special" />
<Description DefaultValue="Red Planet Outlook special Support" />
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://somedomain/assets/icon.png" />
<HighResolutionIconUrl DefaultValue="https://somedomain/assets/icon.png" />
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!-- <SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" /> -->
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://somedomain</AppDomain>
<AppDomain>https://somedomain</AppDomain>
<!-- <AppDomain>AppDomain3</AppDomain> -->
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://somedomain/index.html" />
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</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">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="fnFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault2">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup2">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton2">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon32" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon80" DefaultValue="https://somedomain/assets/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://somedomain/#functions" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://somedomain/#task-pane" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Red Planet" />
<bt:String id="customTabLabel" DefaultValue="Red Planet Tab" />
<bt:String id="paneReadButtonLabel" DefaultValue="special Reply" />
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties" />
<bt:String id="groupLabel2" DefaultValue="Red Planet2" />
<bt:String id="customTabLabel2" DefaultValue="Red Planet Tab2" />
<bt:String id="paneReadButtonLabel2" DefaultValue="special Reply2" />
<bt:String id="paneReadSuperTipTitle2" DefaultValue="Get all properties2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<MobileFormFactor>
<FunctionFile resid="fnFile" />
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="mobileGroupID">
<Label resid="residAppName" />
<Control xsi:type="MobileButton" id="TaskPaneBtn">
<Label resid="residTaskPaneButtonName" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="icon16" />
<bt:Image size="25" scale="2" resid="icon16" />
<bt:Image size="25" scale="3" resid="icon16" />
<bt:Image size="32" scale="1" resid="icon16" />
<bt:Image size="32" scale="2" resid="icon16" />
<bt:Image size="32" scale="3" resid="icon16" />
<bt:Image size="48" scale="1" resid="icon16" />
<bt:Image size="48" scale="2" resid="icon16" />
<bt:Image size="48" scale="3" resid="icon16" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon32" DefaultValue="https://somedomain/assets/icon.png" />
<bt:Image id="icon80" DefaultValue="https://somedomain/assets/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://somedomain/#functions" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://somedomain/#task-pane" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="residTaskPaneButtonName" DefaultValue="Mobile test" />
<bt:String id="residAppName" DefaultValue="Mobile Testing" />
<bt:String id="residTaskpaneUrl" DefaultValue="Mobile test2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
仅当 VersionOverrides 的 xsi:type 属性值为 VersionOverridesV1_1 时才能指定 MobileFormFactor。
您也可以参考this了解更多信息
您发布的清单中存在几个问题...
DefaultMinVersion
不能高于VersionOverridesV1_1
(1.3) 中指定的值。Url
资源应该指向.html
文件,包括FunctionFile
.VersionOverridesV1_1
部分不从VersionOverridesV1_0
部分获取任何内容,您必须重复ExtensionPoint
并在VersionOverridesV1_1
中适当地Resources
。
VersionOverridesV1_0
(1.5) 部分的 当您修复上面的所有问题时,清单应该如下所示 XML 并且可以使用...
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>your_id</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Red Planet</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Red Planet special" />
<Description DefaultValue="Red Planet Outlook special Support" />
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:44300/Images/app-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:44300/Images/app-80.png" />
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!-- <SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" /> -->
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://somedomain.com</AppDomain>
<AppDomain>https://somedomain.com</AppDomain>
<!-- <AppDomain>AppDomain3</AppDomain> -->
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:44300/index.html" />
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</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">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="fnFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault2">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup2">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton2">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://localhost:44300/Images/app-16.png" />
<bt:Image id="icon32" DefaultValue="https://localhost:44300/Images/app-32.png" />
<bt:Image id="icon80" DefaultValue="https://localhost:44300/Images/app-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://localhost:44300/functions.html" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44300/task-pane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Red Planet" />
<bt:String id="customTabLabel" DefaultValue="Red Planet Tab" />
<bt:String id="paneReadButtonLabel" DefaultValue="special Reply" />
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties" />
<bt:String id="groupLabel2" DefaultValue="Red Planet2" />
<bt:String id="customTabLabel2" DefaultValue="Red Planet Tab2" />
<bt:String id="paneReadButtonLabel2" DefaultValue="special Reply2" />
<bt:String id="paneReadSuperTipTitle2" DefaultValue="Get all properties2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="fnFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault2">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup2">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton2">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>showspecialModal</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
<MobileFormFactor>
<FunctionFile resid="fnFile" />
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="mobileGroupID">
<Label resid="residAppName" />
<Control xsi:type="MobileButton" id="TaskPaneBtn">
<Label resid="residTaskPaneButtonName" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="icon16" />
<bt:Image size="25" scale="2" resid="icon16" />
<bt:Image size="25" scale="3" resid="icon16" />
<bt:Image size="32" scale="1" resid="icon16" />
<bt:Image size="32" scale="2" resid="icon16" />
<bt:Image size="32" scale="3" resid="icon16" />
<bt:Image size="48" scale="1" resid="icon16" />
<bt:Image size="48" scale="2" resid="icon16" />
<bt:Image size="48" scale="3" resid="icon16" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://localhost:44300/Images/app-16.png" />
<bt:Image id="icon32" DefaultValue="https://localhost:44300/Images/app-32.png" />
<bt:Image id="icon80" DefaultValue="https://localhost:44300/Images/app-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="fnFile" DefaultValue="https://localhost:44300/functions.html" />
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="https://localhost:44300/task-pane.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Red Planet" />
<bt:String id="customTabLabel" DefaultValue="Red Planet Tab" />
<bt:String id="paneReadButtonLabel" DefaultValue="special Reply" />
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties" />
<bt:String id="groupLabel2" DefaultValue="Red Planet2" />
<bt:String id="customTabLabel2" DefaultValue="Red Planet Tab2" />
<bt:String id="paneReadButtonLabel2" DefaultValue="special Reply2" />
<bt:String id="paneReadSuperTipTitle2" DefaultValue="Get all properties2" />
<bt:String id="residTaskPaneButtonName" DefaultValue="Mobile test" />
<bt:String id="residAppName" DefaultValue="Mobile Testing" />
<bt:String id="residTaskpaneUrl" DefaultValue="Mobile test2" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Open up the special send dialog." />
<bt:String id="paneReadSuperTipDescription2" DefaultValue="Open up the special send dialog." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>