gpt4 book ai didi

outlook-addin - 发布使用 Outlook 预览元素的 Outlook 加载项 - SupportsSharedFolders

转载 作者:行者123 更新时间:2023-12-02 00:20:38 27 4
gpt4 key购买 nike

我正在开发可与共享邮箱一起使用的 Outlook 加载项。目前,office 插件在委托(delegate)场景中不可用,但 MS 已经发布了支持这些场景的预览版本。https://learn.microsoft.com/en-us/office/dev/add-ins/reference/manifest/supportssharedfolders

我的问题是因为 manifest.xml 有预览元素;我无法将其上传到 outlook.office365.com 下的 my add-ins。我收到以下错误。

无法安装此应用程序。 list 文件不符合架构定义。命名空间“http://schemas.microsoft.com/office/mailappversionoverrides/1.1”中的元素“DesktopFormFactor”在命名空间“http://schemas.microsoft.com/office/mailappversionoverrides/1.1”中具有无效的子元素“SupportsSharedFolders” .预期的可能元素列表:命名空间“http://schemas.microsoft.com/office/mailappversionoverrides/1.1”中的“ExtensionPoint”...命名空间“http://schemas.microsoft.com/office”中的元素“DesktopFormFactor”/mailappversionoverrides/1.1' 在命名空间“http://schemas.microsoft.com/office/mailappversionoverrides/1.1”中具有无效的子元素“SupportsSharedFolders”。预期的可能元素列表:命名空间“http://schemas.microsoft.com/office/mailappversionoverrides/1.1”中的“ExtensionPoint”。

有谁知道为用户部署加载项或什至在不上传 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>

最佳答案

解释@Bubuhubu 的回答,并希望能帮助遇到此问题的其他人。

如果您使用 yo 生成器最初创建您的 list ,如以下 Microsoft 如何文章中所述: https://learn.microsoft.com/en-us/outlook/add-ins/addin-tutorial

您会注意到 <VersionOverrides>创建的标签没有版本号。此版本的 VersionOverrides 元素不支持 <SupportsSharedFolders>标记,但 1.1 版本有。

您可能认为您可以简单地将 VersionOverrides 标记的 xmlns 和类型标记更改为 1.1 以获得标记支持,但显然 OfficeApp 标记不支持 1.1 VersionOverrides 标记。但是,支持它作为 VersionOverrides 1.0 标记的子元素。

因此,解决此问题的最简单方法是从您的生成器中获取您的 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">

现在看起来像这样:

  <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">

同样,在文档末尾附近,找到:

</VersionOverrides>

并将其更改为:

    </VersionOverrides>
</VersionOverrides>

您现在可以使用 <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>

希望这有助于节省一些时间。

顺便说一句,显然,当您在 Outlook 中添加插件时,它最多可能需要 60 秒才能显示出来。因此,如果您没有立即看到您的图标,请不要一开始就假设它不起作用(就像我最初所做的那样)。

关于outlook-addin - 发布使用 Outlook 预览元素的 Outlook 加载项 - SupportsSharedFolders,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55471281/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com