ClickOnce does not unregister/re-register VSTO solutions when running from Windows 10

旧时模样 提交于 2020-06-26 12:54:25

问题


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


回答1:


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?




回答2:


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


来源:https://stackoverflow.com/questions/58529078/clickonce-does-not-unregister-re-register-vsto-solutions-when-running-from-windo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!