Bub*_*ubu 2 office-addins outlook-addin yeoman-generator outlook-web-addins
我正在开发 Outlook 插件,它将与共享邮箱一起使用。目前,Office 加载项不适用于代表场景,但 MS 已发布支持这些场景的预览版。
https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/supportssharedfolders
我的问题是因为manifest.xml有预览元素;我无法在outlook.office365.com下面上传它my add-ins。我收到以下错误。
This app can't be installed. The manifest file doesn't conform to the schema definition. The element 'DesktopFormFactor' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1' has invalid child element 'SupportsSharedFolders' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1'. List of possible elements expected: 'ExtensionPoint' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1'... The element 'DesktopFormFactor' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1' has invalid child element 'SupportsSharedFolders' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1'. List of possible elements expected: 'ExtensionPoint' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1'.
任何人都知道任何其他方法来为用户部署加载项,甚至测试它而无需上传 xml 文件吗?
提前致谢。
我的manifest.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"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides"
xsi:type="MailApp">
<Version>1.0.0.0</Version>
<ProviderName></ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Sample1" />
<Description DefaultValue="First Sample Angular Add-in"/>
<IconUrl DefaultValue="xxxx.jpg" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/hi-res-icon.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<SupportUrl DefaultValue="https://localhost:3000/support.html" />
<!-- 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>AppDomain1</AppDomain>
<AppDomain>AppDomain2</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:3000/index.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Description resid="residDescription" />
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</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">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<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="functionFile" />
<SupportsSharedFolders>true</SupportsSharedFolders>
<!-- 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="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<!-- add information on resources -->
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
Run Code Online (Sandbox Code Playgroud)
解释@Bubuhubu的答案,并希望帮助其他遇到这个问题的人。
如果您使用 yo 生成器最初创建清单,如以下 Microsoft 如何文章中所述: https: //learn.microsoft.com/en-us/outlook/add-ins/addin-tutorial
您会注意到<VersionOverrides>创建的标签没有版本号。此版本的 VersionOverrides 元素不支持该<SupportsSharedFolders>标记,但 1.1 版本支持。
您可能认为只需将 VersionOverrides 标记的 xmlns 和 type 标记更改为 1.1 即可获得支持的标记,但显然 OfficeApp 标记内不支持 1.1 VersionOverrides 标记。但是,它支持作为 VersionOverrides 1.0 标记的子元素。
因此,解决此问题的最简单方法是从生成器中获取 manifest.xml 并查找:
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
Run Code Online (Sandbox Code Playgroud)
并在其之后添加:
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
Run Code Online (Sandbox Code Playgroud)
现在看起来像这样:
<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">
Run Code Online (Sandbox Code Playgroud)
同样,在文档末尾附近,找到:
</VersionOverrides>
Run Code Online (Sandbox Code Playgroud)
并将其更改为:
</VersionOverrides>
</VersionOverrides>
Run Code Online (Sandbox Code Playgroud)
您现在可以使用<SupportsSharedFolders>,例如您的manifest.xml应如下所示:
. . .
<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.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<SupportsSharedFolders>true</SupportsSharedFolders>
. . .
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
Run Code Online (Sandbox Code Playgroud)
希望这有助于节省某人一些时间。
顺便说一句,显然,当您在 Outlook 中添加插件时,它可能需要长达 60 秒的时间才能显示。因此,如果您没有立即看到图标,请不要一开始就认为它不起作用(就像我最初那样)。
| 归档时间: |
|
| 查看次数: |
1908 次 |
| 最近记录: |