Excel 加载项任务窗格 XML 清单中的 AppDomains 元素存在问题

Problems with AppDomains element in Excel Add-in task pane XML manifest

我没有要使用 Excel 加载项任务窗格清单中 <AppDomains/> 元素内的 <AppDomain/> 子元素指定的应用程序域。我不能留下未指定的 <AppDomain/>,因为这会在验证时产生错误:

Package acceptance validation error: XML Schema Validation Error Error found during XML Schema validation. Code: The 'http://schemas.microsoft.com/office/appforoffice/1.1:AppDomain' element is invalid - The value '' is invalid according to its datatype 'http://schemas.microsoft.com/office/appforoffice/1.1:LongString' - The actual length is less than the MinLength value. Line: 16 Column: 10

鉴于 the latter has property minOccurs="1".

,我可能无法删除 <AppDomain/> 并保留 <AppDomains/>

我发现 this manifest example 省略了 <AppDomains/><AppDomain/>。但是,我不知道这是否是官方的做法。我没有找到描述 <AppDomains/> 是否是 Office 任务窗格清单的强制性元素以及如果没有要列出的内容应该做什么的文档。

<AppDomains> 不是强制性的。您可以在此处找到所需元素的列表:Manifest required elements. Also, the official XSD for the manifest is here: MS-OWEMXML.