При создании проекта Office Add-in Manifest в Visual Studio 2017 мы получаем ошибки с определением схемы, не включающим элемент SupportsSharedFolders
. Однако в документации говорится, что этот элемент поддерживается в версии 1.8: https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/supportssharedfolders
error : The element 'DesktopFormFactor' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1' has invalid child element 'SupportsSharedFolders' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1'. List of possible elements expected: 'FunctionFile, ExtensionPoint' in namespace 'http://schemas.microsoft.com/office/mailappversionoverrides/1.1'.
Вот пример манифеста, который может быть загруженным в почтовый ящик Office 365, содержащий элемент:
<!--Published:70EDFC97-B41D-43C5-B751-7C00AD999804-->
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<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>e6497c92-80b1-47c6-b983-28bb81fde0ca</Id>
<Version>1.0.0</Version>
<ProviderName>Example</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Test Add-in" />
<Description DefaultValue="An example add-in" />
<IconUrl DefaultValue="https://localhost/icon.png" />
<HighResolutionIconUrl DefaultValue="https://localhost/icon.png" />
<SupportUrl DefaultValue="https://example.com" />
<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/index.html" />
<RequestedHeight>216</RequestedHeight>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="https://localhost/index.html" />
<RequestedHeight>216</RequestedHeight>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="https://localhost/index.html" />
</PhoneSettings>
</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">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Message compose form -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgComposeGroup">
<Label resid="groupLabel" />
<!-- Task pane button -->
<Control xsi:type="Button" id="msgComposeOpenPaneButton">
<Label resid="paneComposeButtonLabel" />
<Supertip>
<Title resid="paneComposeSuperTipTitle" />
<Description resid="paneComposeSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="cmd-icon-16" />
<bt:Image size="32" resid="cmd-icon-32" />
<bt:Image size="80" resid="cmd-icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="composeTaskPaneUrl" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="cmd-icon-16" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-32" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-80" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-25" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-48" DefaultValue="https://localhost/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="composeTaskPaneUrl" DefaultValue="https://localhost/index.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Example" />
<bt:String id="paneComposeButtonLabel" DefaultValue="Test Add-in" />
<bt:String id="paneComposeSuperTipTitle" DefaultValue="Test Add-in Super Tip" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneComposeSuperTipDescription" DefaultValue="A test add-in" />
</bt:LongStrings>
</Resources>
<!-- 1.1 overrides -->
<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>
<!-- Message compose form -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgComposeGroup">
<Label resid="groupLabel" />
<!-- Task pane button -->
<Control xsi:type="Button" id="msgComposeOpenPaneButton">
<Label resid="paneComposeButtonLabel" />
<Supertip>
<Title resid="paneComposeSuperTipTitle" />
<Description resid="paneComposeSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="cmd-icon-16" />
<bt:Image size="32" resid="cmd-icon-32" />
<bt:Image size="80" resid="cmd-icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="composeTaskPaneUrl" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
<MobileFormFactor>
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="mobileGroupID">
<Label resid="paneComposeButtonLabel" />
<Control xsi:type="MobileButton" id="mobileButton1">
<Label resid="paneComposeButtonLabel" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="cmd-icon-25" />
<bt:Image size="25" scale="2" resid="cmd-icon-25" />
<bt:Image size="25" scale="3" resid="cmd-icon-25" />
<bt:Image size="32" scale="1" resid="cmd-icon-32" />
<bt:Image size="32" scale="2" resid="cmd-icon-32" />
<bt:Image size="32" scale="3" resid="cmd-icon-32" />
<bt:Image size="48" scale="1" resid="cmd-icon-48" />
<bt:Image size="48" scale="2" resid="cmd-icon-48" />
<bt:Image size="48" scale="3" resid="cmd-icon-48" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="composeTaskPaneUrl" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="cmd-icon-16" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-32" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-80" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-25" DefaultValue="https://localhost/icon.png" />
<bt:Image id="cmd-icon-48" DefaultValue="https://localhost/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="composeTaskPaneUrl" DefaultValue="https://localhost/index.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Example" />
<bt:String id="paneComposeButtonLabel" DefaultValue="Test Add-in"/>
<bt:String id="paneComposeSuperTipTitle" DefaultValue="Test Add-in Super Tip" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneComposeSuperTipDescription" DefaultValue="An example add-in." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>