问题
Very perplexing
I am developing an Outlook Add-In to open a pane from a button on the compose email window.
I have loaded into a test account on outlook.com, and it works perfectly.
When I go to side-load the add into Outlook Desktop (by loading the manifest XML directly by file), the system accepts it.
However, when I close the Microsoft Add-In Store window, the add-in is not in the compose email, AND when I go manage my add-ins, the manifest I loaded is not there.
The add-in is designed to fetch all icons and iFrame HTML from a web-server hosted on AWS. I have attached the manifest down below (sans all ID information, and any other info I deemed sensitive)
A couple of notes
The system does not reject my add-in. I see the add-in successfully loaded in the custom section of the store in Outlook Desktop. It only disappears once I close this window.
The add-in works on Outlook.com. Passed all QA tests.
I assume the add-in is being hard-deleted by the app for some reason? If there is a way to troubleshoot these issues from Outlook, I would love to know. This is my first outlook application (generally a mobile developer).
The same issue happens for Outlook for Mac Desktop as it does Outlook for PC Desktop.
Please help!
<?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"
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Brgn.Tech</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="Brgn.Tech" />
<Description DefaultValue="Easily access your Brgn.Tech Tenant Information from your outlook account!"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:5001/brand-assets/brgnTechIcon.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:5001/brand-assets/brgnTechIcon.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<SupportUrl DefaultValue="https://hello.brgn.tech" />
<!-- 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. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:5001/outlook"/>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
</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 Read -->
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageComposeEmail" />
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="https://localhost:5001/brand-assets/brgnTechIcon.png"/>
<bt:Image id="icon32" DefaultValue="https://localhost:5001/brand-assets/brgnTechIcon.png"/>
<bt:Image id="icon80" DefaultValue="https://localhost:5001/brand-assets/brgnTechIcon.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="messageComposeEmail" DefaultValue="https://localhost:5001/outlook"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="My Add-in Group"/>
<bt:String id="customTabLabel" DefaultValue="My Add-in Tab"/>
<bt:String id="paneReadButtonLabel" DefaultValue="Display all properties"/>
<bt:String id="paneReadSuperTipTitle" DefaultValue="Get all properties"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
</bt:LongStrings>
</Resources>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<WebApplicationInfo>
<Scopes>
<Scope>user.readwrite</Scope>
<Scope>calendars.readwrite</Scope>
<Scope>contacts.readwrite</Scope>
<Scope>mail.readwrite</Scope>
<Scope>mail.send</Scope>
<Scope>mailboxsettings.readwrite</Scope>
</Scopes>
</WebApplicationInfo>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
回答1:
It seems the issue was in the v1_1 version override on the bottom. After I deleted that, I was able to correct the problem
回答2:
Your manifest only has the WebApplicationInfo node in VerisonOverrides 1.1. If the client supports VerisonOverrides 1.1, we pick everything under 1.1 and nothing under 1.0 is used to show on the client. If you need the MessageComposeCommandSurface, you will need to copy everything under VersionOverrides 1.0 to 1.1 as well. This way clients that support VerisonOverrides 1.1, will render the command surface and webapplicationinfo node and clients that do not support VersionOverrides 1.1 will fallback to 1.0 to only show the compose command surface. The fact that it works in OWA is something we will investigate. For now to get around the issue, simply copy everything in VersionOverride 1.0 to 1.1 and you should see things work.
来源:https://stackoverflow.com/questions/50709399/outlook-add-in-side-loaded-custom-add-in-disappears-after-i-close-the-windows