2017-12-27 99 views
2

我已提交驗證3次...但所有這些都失敗了......如何改進這個清單xml文件傳遞驗證?原因`在VersionOverrides元素中似乎存在問題.`?

當我創建單詞加載項目時,我的清單xml文件是由VS2017生成的。

它在我的系統中正常工作。

Windows 10 64 bits 
Word 2016 with the lastest update 
Word online with chrome 

VS2017 

我的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:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" 
     xsi:type="TaskPaneApp"> 

    <Id>xxxxxxxx-xxxx-xxxx-xxxx-e53e4d4aaxxx</Id> 

    <Version>1.0.0.0</Version> 
    <ProviderName>服務有限公司</ProviderName> 
    <DefaultLocale>zh-CN</DefaultLocale> 
    <DisplayName DefaultValue="應用名稱" /> 
    <Description DefaultValue="描述" /> 
    <IconUrl DefaultValue="https://word.xxxxxxx.cn/Images/icon32x32.png" /> 
    <SupportUrl DefaultValue="https://xxxxxxx.cn" /> 

    <AppDomains> 
     <AppDomain>https://www.xxxxxxx.com</AppDomain>    
     <AppDomain>https://xxxxxxx.cn</AppDomain>     
     <AppDomain>https://www.xxxxxxx.com</AppDomain>    
     <AppDomain>http://xxxxxxx:111</AppDomain>    
     <AppDomain>https://word.xxxxxxx.cn</AppDomain>    
     <AppDomain>https://xxxxxxx.xxxxxxx.cn</AppDomain>   
    </AppDomains> 

    <Hosts> 
     <Host Name="Document" /> 
    </Hosts> 
    <Requirements> 
     <Sets DefaultMinVersion="1.1"> 
      <Set Name="IdentityAPI"/> 
     </Sets> 
    </Requirements> 

    <DefaultSettings> 
     <SourceLocation DefaultValue="https://word.xxxxxxx.cn" /> 
    </DefaultSettings> 

    <Permissions>ReadWriteDocument</Permissions> 

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0"> 

     <Hosts> 
      <Host xsi:type="Document"> 
       <DesktopFormFactor> 
        <GetStarted> 
         <Title resid="Contoso.GetStarted.Title"/> 
         <Description resid="Contoso.GetStarted.Description"/> 
         <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/> 
        </GetStarted> 
        <FunctionFile resid="Contoso.DesktopFunctionFile.Url" /> 
        <ExtensionPoint xsi:type="PrimaryCommandSurface"> 
         <OfficeTab id="TabHome"> 
          <Group id="Contoso.Group1"> 
           <Label resid="Contoso.Group1Label" /> 
           <Icon> 
            <bt:Image size="16" resid="Contoso.tpicon_16x16" /> 
            <bt:Image size="32" resid="Contoso.tpicon_32x32" /> 
            <bt:Image size="80" resid="Contoso.tpicon_80x80" /> 
           </Icon> 
           <Control xsi:type="Button" id="Contoso.TaskpaneButton"> 
            <Label resid="Contoso.TaskpaneButton.Label" /> 
            <Supertip> 
             <Title resid="Contoso.TaskpaneButton.Label" /> 
             <Description resid="Contoso.TaskpaneButton.Tooltip" /> 
            </Supertip> 
            <Icon> 
             <bt:Image size="16" resid="Contoso.tpicon_16x16" /> 
             <bt:Image size="32" resid="Contoso.tpicon_32x32" /> 
             <bt:Image size="80" resid="Contoso.tpicon_80x80" /> 
            </Icon> 
            <Action xsi:type="ShowTaskpane"> 
             <TaskpaneId>ButtonId1</TaskpaneId> 
             <SourceLocation resid="Contoso.Taskpane.Url" /> 
            </Action> 
           </Control> 
          </Group> 
         </OfficeTab> 
        </ExtensionPoint> 
       </DesktopFormFactor> 
      </Host> 
     </Hosts> 

     <Resources> 
      <bt:Images> 
       <bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://xxxxxxx.xxxxxxx.cn/Images/icon16x16.png" /> 
       <bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://xxxxxxx.xxxxxxx.cn/Images/icon32x32.png" /> 
       <bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://xxxxxxx.xxxxxxx.cn/Images/icon80x80.png" /> 
      </bt:Images> 
      <bt:Urls> 
       <bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" /> 
       <bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://xxxxxxx.xxxxxxx.cn/index" /> 
       <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 
      </bt:Urls> 
      <bt:ShortStrings> 
       <bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="名稱" /> 
       <bt:String id="Contoso.Group1Label" DefaultValue="點擊進入" /> 
       <bt:String id="Contoso.GetStarted.Title" DefaultValue="名稱" /> 
      </bt:ShortStrings> 
      <bt:LongStrings> 
       <bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="文字" /> 
       <bt:String id="Contoso.GetStarted.Description" DefaultValue=" " /> 
      </bt:LongStrings> 
     </Resources> 
    </VersionOverrides> 

</OfficeApp> 

這裏有一些測試結果:

4.12.1 Your app or add-in must be fully functional 
with the supported operating systems, browsers, and 
devices for Office 2013, Office 2016, SharePoint 
2013, and Office 365. 

The add-in is not available to be inserted in the 
Word 2016 Client on Windows 10 with Internet 
Explorer 11 and in the Word Client on Mac when 
using the submitted manifest, however if the 
VersionOverrides element is removed, the add-in 
becomes insertable without add-in commands. 

This suggests the issue may be in the version 
overrides element. For more information on version 
overrides and add-in commands, please see: 
https://dev.office.com/reference/addins/manifest/versionoverrides 
https://dev.office.com/docs/addins/develop/define-add-in-commands 
Please see 7.9 below. 

7.9 Your add-in’s packages must be correctly 
formatted and conform to the current manifest 
schema. For Office Add-ins, this is manifest schema 
version 1.1. 

Your add-in manifest does not conform to the 
schema. 
There appears to be an issue in the 
VersionOverrides element. 

Some of the URLs mentioned in your add-in 
manifest do not exist. Please ensure all URLs 
mentioned in your add-in manifest exist, including 
any mentioned in the description of the add-in. 
~remoteAppUrl/Functions/FunctionFile.html 

我真的被它迷惑....

我已閱讀測試詳細信息文件中列出的所有頁面。但我仍然不明白。

請幫忙,我完全喪失了接下來該做什麼。


  • 更新1:

Office加載驗證工具。驗證這個清單我得到了Passed

Calling validation service. This might take a moment... 
------------------------------------- 
Validation: Passed 
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store: 
    - Word 2016 or later 
    - Word Online 
    - Word 2016 for Mac 
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://dev.office.com/add-in-availability). 

*This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in. 
------------------------------------- 
  • 更新2:

我發現在github上一個例子,我看到我的清單(不residDesktopFuncUrl)....

Word manifest sample in github

回答

0

你沒有什麼區別在清單中有remoteAppUrl(在versionoverrides部分),我相信這是visual studio中的一個開發快捷方式。你必須用你自己的服務器URL來替換它。在提交清單之前,您還可以使用Office Add-In Validator來確保您的清單是正確的。

+0

不要「移除」remoteAppUrl。將其替換爲加載項的生產域。 –

+0

謝謝你們! 'remoteAppUrl'是其中一個問題。我將其替換爲我的生產域。 Office Add-In Validator很有用,我用我的submited manifest.xml文件得到了一個'Passed'。結果已更新。 – Zhili

+0

@Zhili就是我的意思:)現在編輯我的答案! –

0

最後,我發現,如果我提出

<Requirements> 
    <Sets DefaultMinVersion="1.1"> 
     <Set Name="IdentityAPI"/> 
    </Sets> 
</Requirements> 

從我的清單。

然後它工作。 我不知道原因。