Office 加载项无法安装在桌面上

Office add-in can't be installed on dekstop

所以我尝试从 GitHub https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-save-attachments 安装这个 Outlook 加载项。我已经在我的 outlook web 上成功安装了这个插件。所以我在 manifest.xml 上注意到源位置是这样的 https://_SharePointTenantUrl_/_layouts/15/outlookhostedapp.aspx?componentId=04634d50-d72c-45ec-81d0-7b1f803800da。首先,我认为无法在桌面上工作,因为它无法读取 SharePointTenantUrl,所以我将其更改为我的 SharePoint 地址。但是当我安装它时,该应用程序仍然没有出现在我的 outlook 桌面上。 这是 manifest.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>04634d50-d72c-45ec-81d0-7b1f803800da</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>SPFx Provider</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Save Attachments"/>
  <Description DefaultValue="An SPFx Outlook addin that lets users copy email attachments to OneDrive folders."/>
  <IconUrl DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
  <HighResolutionIconUrl DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
  <SupportUrl DefaultValue="https://localhost:4321/help"/>
  <AppDomains>
    <AppDomain>https://login.microsoftonline.com</AppDomain>
    <AppDomain>https://login.windows.net</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.4" />
      <Set Name="SharePointHostedAddin" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://_SharePointTenantUrl_/_layouts/15/outlookhostedapp.aspx?componentId=04634d50-d72c-45ec-81d0-7b1f803800da"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</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">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <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" />
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
          <bt:Image id="Icon.32x32" DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
          <bt:Image id="Icon.80x80" DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://_SharePointTenantUrl_/_layouts/15/outlookhostedapp.aspx?componentId=04634d50-d72c-45ec-81d0-7b1f803800da" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="Add-in groupLabel"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens taskpane."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

存储库用于 SPFx web 部件,必须安装在 SharePoint 应用程序目录中。

This repository contains community samples that demonstrate different usage patterns for the SharePoint Framework client-side web parts.

[...]

SharePoint client-side web parts are controls that appear inside a SharePoint page but run locally in the browser. They're the building blocks of pages that appear on a SharePoint site.

您的 SharePoint 管理员可以帮助您为租户设置应用程序目录。如果您是 SharePoint 管理员,您可能需要参考 https://docs.microsoft.com/en-us/sharepoint/use-app-catalog