1
votes

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:

  1. Create a new "Word 2013 and 2016 VSTO Add-in "project
  2. Start Debugging (F5), MS Word starts
  3. 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
  4. Select the add-in and click the [Remove] button
  5. Stop debugging, this closes Ms Word
  6. Start debugging (F5), Ms Word starts
  7. 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.

1
The answer may be in this post stackoverflow.com/questions/56224143/…Boeryepes

1 Answers

0
votes

So far the best I could do was to change the Assembly Name. This allows the solution to be seen as a different Add-in by Ms Word and to be registered correctly. It works, but this is far from being acceptable..


Update 1

Now working with fully signed releases, and following substantial testing: this is an issue with Windows 10 only, where ClickOnce is "cut loose" from the VSTO it installed after it being installed for the first time: uninstall your ClickOnce app via the App & Settings panel, and the VSTO is not unregistered from Word; or unregister the VSTO manually, and ClickOnce is unable to re-register it into Word.

The above steps can be undertaken under Windows 7 with no problems.


Update 2

Looks like this was related to the installation version of Office: Click-to-Run vs Microsoft Store. The issue did not come up with Windows 7 because Microsoft Store installations are not available.

Full response here: https://stackoverflow.com/a/58625402/10794555