I've got a strange issue with a Word VSTO add-in on one machine where running the visual studio project opens word but does not attempt to start the add in as far as I can tell.
I got to this point because I accidentally clicked Remove for the Add-in on the Manage COM Add-ins page, instead of re-enabling it after a failure.
I want to know how to re-enable a deleted add-in - I'm thinking that perhaps there is a registry key somewhere I need to get rid of.
I've tried installing and uninstalling the published version, to see if that wakes anything up, and I've tried changing the path of the VS project, just in case that makes a difference (and various restarts, cleans, rebuilds, locally deleting and re-cloning from git etc) but I can't find a way to get this to work again. On a different machine, cloning the add-in from Git and opening it in Visual Studio and its all fine.
I've tried re-adding via the select DLL (or select .) dialog on the COM Add-ins but nothing I select appears to be a valid add-in.
Any help to figure out how to get back to a working development environment would be appreciated.
EDIT There's a lot going on below - so I thought I'd clarify that the successful solution was the online-repair of Office
To create a new Excel VSTO Add-in project in Visual StudioOn the File menu, point to New, and then click Project. In the templates pane, expand Visual C# or Visual Basic, and then expand Office/SharePoint. Under the expanded Office/SharePoint node, select the Office Add-ins node.
The required VSTO Add-in registry entries are located under the following registry keys where Root is HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE depending if the installation is for the current user or all users.
If you want to get your add-in auto-updated you need to publish it to any web server and then install it from there. Then if required you may publish an update. Your add-in will be automatically updated.
To re-enable a VSTO Add-in In the application, click the File tab. Click the ApplicationName Options button. In the categories pane, click Add-ins. In the details pane, verify that the VSTO Add-in appears in the Disabled Application Add-ins list.
Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while the Startup event handler is executing.
In the details pane, verify that the VSTO Add-in appears in the Inactive Application Add-ins list. The Name column specifies the name of the assembly, and the Location column specifies the full path of the application manifest. In the Manage box, click COM Add-ins, and then click Go.
In the details pane, verify that the VSTO Add-in appears in the Inactive Application Add-ins list. The Name column specifies the name of the assembly, and the Location column specifies the full path of the application manifest.
I believe that you need to change the version of the VSTO add-in in order to be able to update it or re-install it. Once an add-in version has been disabled, this is permanent.
See Uninstall MS Word Add-in for details. Let me know if that worked.
What is the LoadBehaviour
in the registry? It should be 3
...
To find out, look in
where Root is HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE, depending on whether the addin is installed for current user or everyone.
If the value for LoadBehaviour
is not 3
, then change it to 3
and restart Word.
Here is the Microsoft docs about it: Registry entries for VSTO Add-ins
If it still does not work, try to re-enable as it might be hard disabled:
Here is the Microsoft docs about it: How to: Re-enable a VSTO Add-in that has been disabled
Also, if you haven't done this already, it is worth setting VSTO_SUPPRESSDISPLAYALERTS
to 0
as described on this page: How do I enable VSTO error / display alerts?
If none of the above helps, then it is worth doing a Online repair of Office from Add or Remove Programs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With