I am developing a VSTO add-in for Ms Word. Run -> Start (F5) in VS 2017 worked fine.
Today I ran my first tests by publishing the add-in (ClickOnce, generating a .vsto file) and setting it up on the same computer I use for developing/debugging. In order to set it up in Word I just double-clicked the .vsto file and get a green-tick confirmation message indicating the customization was successfully installed.
I could use the release version no problem.
Then I wanted to go back to developing/debugging the add-in, but breakpoints would not trigger (in fact at some point VS indicated it would never break because no flags were registered, but I do not get this message anymore). I figured the release version of the app was still enabled and maybe this was what prevented the debug version to run instead of the release version. I went into the "COM Add-ins" window, unticked the add-in, selected it and clicked the [Remove] button, and closed Word.
Since then, no add-in appears in the "COM Add-ins" window of Ms Word. I tried the following:
- I did uninstall the add-in from add/remove programs (Windows 10)
- I did hard-delete the entire registry folder in "Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins"
- I did also try changing the "Manifest" field in the registry to reflect the path to the Debug or also to the Release versions.
- I checked in the "Disabled Items" and "Slow and Disabled Add-ins" listings of the File/Options/Add-ins menu in Ms Word (Office 365), there is nothing in there.
- I did run a Clean/Rebuild of the Project/Solution.
- I tried as a last resort to at least get the release version work, but yet re-installing via the published .vsto file does not work either.
- Adding the release or debug version (.exe file generated along with the .vsto file) of the add-in via the [Add...] button of the "COM Add-ins" window directly into Ms Word does not have any effect either: no new entry is added to the list in that same window, although I get a success confirmation message from the MS Office Customization Installer, and a folder of entries is added to the registry at "Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins".
- Repair/Reset -ing the Word App does not work (from "Add or remove programs")
- Uninstalling the Word App and then re-installing it from the Microsoft Store does not work either
Help? :D
Update
I was able to repeat the behaviour several times:
- Create a new "Word 2013 and 2016 VSTO Add-in "project
- Start Debugging (F5), MS Word starts
- In Ms Word: File/Options/Add-ins -> Select "COM Add-ins" in the dropdown list and click the [Go..] button to show the "Com Add-ins" window
- Select the add-in and click the [Remove] button
- Stop debugging, this closes Ms Word
- Start debugging (F5), Ms Word starts
- The add-in is not loaded and does not appear in the "COM Add-ins" window
Yet, Regedit shows the expected entries for the Add-in.