Resolve Deployment.AddInAlreadyInstalledException installing a Microsoft Office add-in

Attention! Invantive software product are no longer shipped using Microsoft ClickOnce. Starting Summer 2017, solely MSI installers are made available. Please use a current installer from download.invantive.com.

AddInAlreadyInstalledException when upgrading?

Various Invantive products make use of the possibilities of ClickOnce. This is a Microsoft technology which allows the installation of Windows applications through a link in a web page of through an executable program in a folder. Once installed the ClickOnce application updates itself automatically once a new version becomes available.

ClickOnce is used for example with Invantive for Outlook, which allows you to have access to your project data within Microsoft Outlook and which allows you to for example submit hours through your Outlook calendar. But Microsoft ClickOnce is also used with amongst others Invantive Control, Invantive Composition and Invantive Query Tool.

Unfortunately the ClickOnce technology sometimes fails to properly pick up a new version. Even if the setup.exe program is executed manually you might receive an error like:

Microsoft.VisualStudio.Tools.Applications.Deployment.AddInAlreadyInstalledException: The add-in is not installed since there is currently already a different version installed for which no upgrade can be executed from this location.. If u wish to install this version of the add-in, you first need to use Software to remove the following program: Invantive.Estate.OutlookAddIn. Subsequently, install the new add-in from the following location:
 
file://server/distribute/invantive-estate-outlook/Invantive.Estate.OutlookAddIn.vsto

at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySolutionCodebaseIsUnchanged(Uri uri, String subscriptionId, Boolean previouslyInstalled)

at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

The Invantive products check themselves that you can only work with the proper versions, so there is no danger to the integrity of the data. But it is still annoying. Of course, you could install the PC again if you get an “AddInAlreadyInstalledException”-error, but you can almost always solve the “AddInAlreadyInstalledException” with the following list of steps.

Make sure to make a usable back-up of your PC prior to your attempts!

Execute the following three steps to resolve the Deployment.AddInAlreadyInstalledException:

  • Uninstall the add-in application as explained below.
  • Empty the ClickOnce cache.
  • Delete the VSTA registration.

Step 1: uninstall the application

The first step consists of uninstalling the Windows application:

  • Go to “Programs and Features” in the Windows Start menu.
  • Find the ClickOnce application.
  • Click on “Uninstall”.
  • Try to install the ClickOnce application again through setup.exe.

Step 2: empty the ClickOnce cache

If the first attempt was not a success, then try to empty the ClickOnce cache:

  • Open the Windows Explorer and click in the address bar.
  • Enter: “%TEMP%....\apps\2.0” and press enter.
  • Search through the subfolders for any folders starting with “inva”.
  • Remove these folders.
  • Try to reinstall the ClickOnce application through setup.exe.

Step 3: delete the VSTA registration

If the second attempt was not successful either, then remove the VSTA registration to solve the AddInAlreadyInstalledException:

  • Start the register editor (regedit.exe) as the user that wants to install the ClickOnce application.
  • Navigate to the register key HKEY_CURRENT_USER\Software\Microsoft\VSTA\Solutions.
  • Remove the key(s) which has a Character String beginning with “Invantive”.
  • Try to reinstall the ClickOnce application through setup.exe.

After the execution of these steps you should be able to install the ClickOnce application without the feared “Deployment.AddInAlreadyInstalledException”.