Thursday, March 7, 2013

VSTO ClickOnce: Add-In inactive after check for update

I have an Excel 2010 Add-In pulished using ClickOnce. The update option is "Check every time the customization runs". Publish and Installation location are the same network folder. The initial installation was successful. But whenever there's new version, the Add-In will become InActive. The error is "Exception: Customization does not have the permissions required to create an application domain.".

I have tried various things including add Trusted Location, Open Excel using Administrative Rights. None of them help.

Things to try:

1.

VSTO 4.0 projects configured to run in VSTOLocal mode against UNC paths do not honour the “EnableVSTOLocalUNC” registry key on 64-bit systems. The VSTO Runtime attempts to read the key from the 64-bit VSTOR registry hive instead of the 32-bit VSTOR registry hive.
To fix this issue, create an EnableVSTOLocalUNC key in the 64-bit hive:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Vsto
Runtime Setup\v4]
"EnableVSTOLocalUNC"=dword:00000001
 For more information see KB 2022442.


reference link

2. Registry

delete keys

HKEY_CURRENT_USER\Software\Microsoft\VSTA\Security\{GUID}
HKEY_CURRENT_USER\Software\Microsoft\VSTA\SolutionMetadata\{GUID}


3. Fix error of "Unable to install this application because an application with the same identity is already installed. To install this application, either modify the manifest version for this application or uninstall the preexisting application."

go to /Program Files/Microsoft Sdks/Windows/v7.0A/bin. run "mage -cc" clear the cache. But no SDK installed on user's computer, so can run "rundll32 dfshim CleanOnlineAppCache" instead.

No comments: