Word Web Add-in. Trying to add a context menu command, but I keep getting the error: This add-in is no longer available
I am working on simple word web add-in, where I am trying to add a context menu command, but when I add the new extension point I get the following error, when I start the debug process:
"This add-in is no longer available: add-ins inserted during development are only available during debugging from Visual Studio. Please open your project in Visual Studio and re-run your application, or deploy your add-in into a valid catalog and re-insert." Below is my full manifest:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>47bea749-a286-4236-b6ca-6afa62ce5f98</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="MyTestPluginCitationPluginWeb"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Document"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</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="GetStarted.Title"/>
<Description resid="GetStarted.Description"/>
<LearnMoreUrl resid="GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="ContextMenu">
<OfficeMenu id="ContextMenuText">
<Control xsi:type="Menu" id="MyMenuId">
<Label resid="Contoso.Menu.Label"/>
<Supertip>
<Title resid="Contoso.Group1Label"/>
<Description resid="Contoso.Group1Label"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Items>
<Item id="myMenuId">
<Label resid="Contoso.Menu.Label"/>
<Supertip>
<Title resid="Contoso.Group1Label"/>
<Description resid="Contoso.Group1Label"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="Commands Group"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="MyTestPlugin" />
<bt:String id="Contoso.Group1Label" DefaultValue="MyTestPlugin" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="MyTestPlugin" />
<bt:String id="Contoso.Menu.Label" DefaultValue="MyTestPlugin" />
<bt:String id="Contoso.MenuItem.Label" DefaultValue="Search for quote" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
as soon as I add this part, the addin fails to load
<ExtensionPoint xsi:type="ContextMenu">
<OfficeMenu id="ContextMenuText">
<Control xsi:type="Menu" id="MyMenuId">
<Label resid="Contoso.Menu.Label"/>
<Supertip>
<Title resid="Contoso.Group1Label"/>
<Description resid="Contoso.Group1Label"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Items>
<Item id="myMenuId">
<Label resid="Contoso.Menu.Label"/>
<Supertip>
<Title resid="Contoso.Group1Label"/>
<Description resid="Contoso.Group1Label"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint>
The commands.js file contains the following default command:
/**
* Shows a notification when the add-in command is executed.
* @param event {Office.AddinCommands.Event}
*/
function action(event) {
const message = {
type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,
message: "Performed action.",
icon: "Icon.80x80",
persistent: true,
};
I have validated the manifest and it says it's correct.
I have checked that all resids are available.
As soon as I remove the ExtensionPoint for ContextMenu, add-in shows up in Word. Any ideas?
I have tried developing the add in with Visual Studio 2022 and then moved over to Yeoman generator and Node.js environment and Visual Studio Code. Same results both times.
I have tried side loading the application with network share. I add the manifest to share folder without the ContextMenu ExtensionPoint. It works, but as soon as I add the ContextMenu ExtensionPoint, it again shows the error. What am I missing?