Office加载项显示警告 - 其加载项目录(SharePoint App Catalog)

时间:2016-09-07 13:48:49

标签: ms-word office365 office-js office365-apps

我正在尝试部署Word加载项。

  1. 我已将onpremises服务器上的后端部署到IIS。我已经检查过它了。
  2. 我在Office365中创建了一个应用程序目录,并将清单文件上传到目录。目录显示加载项有效
  3. 我已将Office365应用程序目录添加到受信任的目录网站
  4. 我可以添加应用程序,我看到它显示了我的设计的一部分,但是它提供了一个信息文本,并且加载项不起作用:
  5. 信息文字:

      

    添加信息

         

    此加载项使用其加载项目录不支持的功能。

    清单:

    <?xml version="1.0" encoding="UTF-8"?>
    <!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
    <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:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
              xsi:type="TaskPaneApp">
    
      <!-- 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>e4a1b6ce-9333-44b5-bf03-59435dbf66ac</Id>
    
      <!--Version. Updates from the store only get triggered if there is a version change. -->
      <Version>1.0.0.0</Version>
      <ProviderName>Name</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="Name" />
      <Description DefaultValue="Name"/>
    
      <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
      <IconUrl DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
    
      <!-- 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. -->
    
      <!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
      <Hosts>
        <Host Name="Document" />
      </Hosts>
      <DefaultSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/" />
      </DefaultSettings>
      <!-- End TaskPane Mode integration.  -->
    
      <Permissions>ReadWriteDocument</Permissions>
    
      <!-- Begin Add-in Commands Mode integration. -->
      <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    
        <!-- The Hosts node is required. -->
        <Hosts>
          <!-- Each host can have a different set of commands. -->
          <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
          <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
          <Host xsi:type="Document">
            <!-- Form factor. Currently only DesktopFormFactor is supported. -->
            <DesktopFormFactor>
              <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
              <GetStarted>
                <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
                <Title resid="Name.GetStarted.Title"/>
    
                <!-- Description of the Getting Started callout. resid points to a LongString resource -->
                <Description resid="Name.GetStarted.Description"/>
    
                <!-- Point to a url resource which details how the add-in should be used. -->
                <LearnMoreUrl resid="Name.GetStarted.LearnMoreUrl"/>
              </GetStarted>
              <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 
                Think of the FunctionFile as the code behind ExecuteFunction. -->
              <FunctionFile resid="Name.DesktopFunctionFile.Url" />
    
              <!-- PrimaryCommandSurface is the main Office Ribbon. -->
              <ExtensionPoint xsi:type="PrimaryCommandSurface">
                <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
                <OfficeTab id="TabHome">
                  <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
                  <Group id="Name.Group1">
                    <!-- Label for your group. resid must point to a ShortString resource. -->
                    <Label resid="Name.Group1Label" />
                    <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
                    <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
                    <Icon>
                      <bt:Image size="16" resid="Name.tpicon_16x16" />
                      <bt:Image size="32" resid="Name.tpicon_32x32" />
                      <bt:Image size="80" resid="Name.tpicon_80x80" />
                    </Icon>
    
                    <!-- Control. It can be of type "Button" or "Menu". -->
                    <Control xsi:type="Button" id="Name.TaskpaneButton">
                      <Label resid="Name.TaskpaneButton.Label" />
                      <Supertip>
                        <!-- ToolTip title. resid must point to a ShortString resource. -->
                        <Title resid="Name.TaskpaneButton.Label" />
                        <!-- ToolTip description. resid must point to a LongString resource. -->
                        <Description resid="Name.TaskpaneButton.Tooltip" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="Name.tpicon_16x16" />
                        <bt:Image size="32" resid="Name.tpicon_32x32" />
                        <bt:Image size="80" resid="Name.tpicon_80x80" />
                      </Icon>
    
                      <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
                      <Action xsi:type="ShowTaskpane">
                        <TaskpaneId>ButtonId1</TaskpaneId>
                        <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
                        <SourceLocation resid="Name.Taskpane.Url" />
                      </Action>
                    </Control>
                  </Group>
                </OfficeTab>
              </ExtensionPoint>
            </DesktopFormFactor>
          </Host>
        </Hosts>
    
        <!-- You can use resources across hosts and form factors. -->
        <Resources>
          <bt:Images>
            <bt:Image id="Name.tpicon_16x16" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_16.png" />
            <bt:Image id="Name.tpicon_32x32" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_32.png" />
            <bt:Image id="Name.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Button80x80.png" />
          </bt:Images>
          <bt:Urls>
            <bt:Url id="Name.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
            <bt:Url id="Name.Taskpane.Url" DefaultValue="~remoteAppUrl/" />
            <bt:Url id="Name.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
          </bt:Urls>
          <!-- ShortStrings max characters==125. -->
          <bt:ShortStrings>
            <bt:String id="Name.TaskpaneButton.Label" DefaultValue="Templates" />
            <bt:String id="Name.Group1Label" DefaultValue="Name" />
            <bt:String id="Name.GetStarted.Title" DefaultValue="Name templates" />
          </bt:ShortStrings>
          <!-- LongStrings max characters==250. -->
          <bt:LongStrings>
            <bt:String id="Name.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
            <bt:String id="Name.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
          </bt:LongStrings>
        </Resources>
      </VersionOverrides>
      <!-- End Add-in Commands Mode integration. -->
    
    </OfficeApp>
    

    我假设它是导致此问题的清单文件。我不确定这个文件有什么问题,因为我遵循了默认的教程和文件 - &gt; Visual Studio中的新项目。

1 个答案:

答案 0 :(得分:3)

SharePoint加载项目录不支持加载项命令注释。在短期内(除了商店)支持加载项命令的唯一部署选项是我们新的Office 365集中部署工具,它现在处于预览状态。查看文档here。 (请注意,预览目前仅适用于以下地区:美国,加拿大,英国,澳大利亚,爱尔兰和新西兰。)

尽管如此,您仍然可以使用基于SP的目录,但是您需要从清单中删除加载项命令注释(所有覆盖),并且用户需要转到插入对话框以插入外接。

请确保consult this page for all the deployment options有关每个插件的加载项和重要说明。