1

Release an HelloWorld add-in for Ms Word. Sign and publish via ClickOnce, with the installation folder being set to an online directory.

Routine to follow

  1. Run the add-in setup.exe to install via ClickOnce.
  2. Assert the add-in has been registered in File / Options / Add-ins. Close Word.
  3. Go to the Programs and Features panel, and uninstall the ClickOnce application which corresponds to the Add-in.
  4. Launch Word and assert the add-in has been unregistered from File / Options / Add-ins.
  5. Run the add-in setup.exe to install via ClickOnce.
  6. Assert the add-in has been registered in File / Options / Add-ins.
  7. Select Manage: COM Add-ins and press [Go...]. Select the add-in and click [Remove].
  8. Go to the Programs and Features panel, and uninstall the ClickOnce application which corresponds to the Add-in.
  9. Run the add-in setup.exe to install via ClickOnce.
  10. Assert the add-in has been registered in File / Options / Add-ins.

Results under Windows 7 + Office 365

The flow works and all steps are correct.

Results under Windows 10 + Office 365

The flow does not work.

  • Step 4: Uninstalling the ClickOnce application has no effect on the add-in registration with Word.
  • Step 10: Unregistering the add-in manually results in ClickOnce being unable to re-register it: it keeps telling the latest version of the Office Customization is already installed, which is not reflected in Word where no add-in appears as registered.

What to do?

I have raised several flags in the past but got no luck. I have now narrowed down the problem to Windows 10 and additional inconsistent behaviour from ClickOnce (step 4 not working).

Questions:

  1. Are we really the only VSTO publisher to face this highly deterministic issue?
  2. Should we call this a bug? Where could we flag it up?

This is a follow up to the following threads, where I never got an answer:

Unable to re-register VSTO Add-in after choosing [Remove] from COM Add-ins window

https://social.msdn.microsoft.com/Forums/office/en-US/3151614e-8921-4de0-8b4e-1be65537aa8f/unable-to-reregister-vsto-com-addin-after-choosing-remove-from-list-of-quotaddins?forum=vsto

https://social.msdn.microsoft.com/Forums/vstudio/en-US/976266bc-1ce4-4f1c-88d0-0e4e6fa14510/unable-to-reregister-ms-word-vsto-com-addin-when-deployed-through-clickonce?forum=vsto#976266bc-1ce4-4f1c-88d0-0e4e6fa14510

Ama
  • 1,373
  • 10
  • 24
  • Are you deploying to a machine that you used to build it on? – aduguid Oct 23 '19 at 21:32
  • Both machines have Visual Studio installed, but I used machine A to develop, build and sign the solution, whilst I use machine B to install it, from the Internet published location, just as any customer would do. – Ama Oct 24 '19 at 22:05

3 Answers3

3

The problem is not directly linked with Windows 10, but the version of Office: Store or Desktop.

By default, when installing Office on a Windows 10 computer, it is installed from the Microsoft Store. You can tell what version is installed by checking your application version in File / Account: to the right of the [About Word] button, you will find the version and build number, followed by one of these two options:

Click-to-Run

Which means you have the desktop version installed, or

Microsoft Store

Which means you have the store version installed.

The store version causes many issues when it comes to the handling of registry keys, or even files. This issue was resolved by Andrei Smolin from Add-in Express Support Service. He has been extremely useful and diligent by resolving within 24 hrs an issue we had for months. Worth mentioning we are not event (yet) a client.

See his article for additional details.

What next?

Now the question is, how do we report this to Microsoft?

Community
  • 1
  • 1
Ama
  • 1,373
  • 10
  • 24
1

I have noticed 'uninstall' registry key in users' profiles with VSTO apps installed - the 'UninstallString' is missing double-quotes around the VSTO manager, which has spaces within it, eg:

C:\Program Files\Common Files\microsoft shared\VSTO\10.0\VSTOInstaller.exe /uninstall "<path-to-vsto-manifest"

... should this be:

"C:\Program Files\Common Files\microsoft shared\VSTO\10.0\VSTOInstaller.exe" /uninstall "<path-to-vsto-manifest"

I don't author these, I just look after computers that have them installed. I suspect that visual studio generates these strings.

And we get errors when I support users uninstalling them from installed applications list.

0

This issue may be caused if you have built the add-in in debug on your machine and it is also installed from the deploy location.

  1. Open the “COM Add-ins” form by either

    • Go to the Developer ribbon and click on the “COM Add-ins” button

    • Go to the "File" ribbon and click on the "Options" button. Then under “Add-Ins” select “COM Add-ins” and click “Go…”

  2. Select the Add-in name and click the button “Remove”

  3. Then you’ll need to uninstall the Add-in from "Programs and Features"

Also, you could try

  1. Type rundll32 dfshim CleanOnlineAppCache in the command window and run it
aduguid
  • 3,099
  • 6
  • 18
  • 37
  • Thanks Aduguid, your steps 2 and 3 correspond to my steps 7 and 8. `rundll32 dfshim CleanOnlineAppCache` did not fix the problem either. – Ama Oct 25 '19 at 15:28
  • `rundll32 dfshim CleanOnlineAppCache` does not raise any error – Ama Oct 26 '19 at 18:50
  • Sorry, I meant when you install the VSTO click-once add-in. – aduguid Oct 26 '19 at 22:28
  • No error message, both Win7 and Win10 flows show the same windows/forms, except under Win10 where step 5 behaves as if step 3 had not been done (that is, ClickOnce says in a green light message that the last version of the customization is already installed). Same with step 9 which behaves as if step 7 had not been done. – Ama Oct 27 '19 at 15:45
  • Thanks for the research – aduguid Oct 31 '19 at 20:19
  • 1
    No worries, here are my [Excel VSTO projects](https://github.com/Excel-projects) in GitHub – aduguid Nov 01 '19 at 16:12
  • Interesting. May I ask what soft you use for recording your GIFs? – Ama Nov 01 '19 at 17:31