COM Add-in Deployment Issues


Environment: 

Visual Studio 2010, Office 2010, Excel 2010

Error:

"Another version of this product is already installed"?

Solution:

1.       Try uninstalling the application from "Add and remove programs"
2.       If the above step doesn't resolve the issue, run EXE from the command prompt with /x option
3.       Delete Application cache
On Vista, it is located at C:\Users\\AppData\Local\Apps\2.0
4.       As a last step take a backup of the registry. Search for "DSExcelAdd-in" and delete the corresponding entries. PLEASE TAKE THE BACKUP as needed. (esp. Keys under VSTA and VSTO (HKEY_USERS)


Error:

Name:


************** Exception Text **************
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()Name: DSExcelAdd-in
************** Exception Text **************
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

 Solution:

1.       Delete Application cache under
On Vista, it is located at C:\Users\\AppData\Local\Apps\2.0

Error:

 System.Deployment.Application.DeploymentException: 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.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

Solution:

Run the following command in your command prompt
rundll32 dfshim CleanOnlineAppCache

Reference: http://stackoverflow.com/questions/7915257/uninstall-vsto-plugin

Error:

Installed plugin doesn’t load. Even if one activates the plugin through File->Options-> Add-ins,  it immediately goes into “Inactive Application Add-ins” section.

Solution:


Solution 1:

Delete the respective Key at HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Resiliency\Disabled

Solution 2:


Identify the error by adding  'VSTO_SUPPRESSDISPLAYALERTS' environment variable.

Other useful URL’s for troubleshooting:
http://blogs.msdn.com/b/haahmadi/archive/2010/05/26/my-vsto-add-in-does-not-load.aspx


Error:

Add - in disabled or not loading  with the following exception
Customization URI: file:///D:/Partheeva/ExcelAddin/ Exception: Customization could not be loaded because the application domain could not be created. ************** Exception Text ************** Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> Microsoft.VisualStudio.Tools.Applications.Deployment.DeploymentInnerException: Downloading file:///D:/XXXXX/ExcelAddin/DSExcelAdd-in.vsto did not succeed.

Solution :

http://social.msdn.microsoft.com/Forums/en/vsto/thread/495098f8-6364-443a-b2e1-23e650af7e1e

For users who are already impacted:

If the install location is still accessible (and/or if the developer puts a new version into the same location)
1. Re-run setup from the original network share.
2. Re-enable the Add-In / Doc-Level Customization from within the Office application, as described below.

If the install location is NOT accessible (e.g., network share permanently down, or file was installed off of a USB stick which has since been removed)
1. Launch “regedit.exe” from the start menu / start screen.  Navigate to Computer ==> HKEY_CURRENT_USER ==> Software ==> Microsoft ==> VSTA ==> Solutions.
2. There should be several entries there, identified by GUIDs.  Click on each entry and check the “ProductName” data until you find the Add-In that you’re trying to re-enable.
3. For the Add-In that’s having problems, double-click on UpdateEnabled.
4. Change the “Value data” to 0 and press “OK”.  This will disable Update Checking (and hence cure the problem) until a new version of an add-in is explicitly installed, or until the user repeats the same steps, and sets “UpdateEnabled” to “1”.

After editing the Registry, the user should re-launch the Office App (e.g., Excel), and go through the usual steps of re-enabling the add-in (see below).
The usual steps of re-enabling the add-in: (required in either case for any user with currently-disabled add-ins)
1. Open the application’s options (e.g., “Excel Options”) and navigate to the Add-Ins tab.
2. Select “COM Add-ins” from the “Manage” dropdown.
3. Press “Go…”.  A window will open.
4. Enable the checkbox for the Add-In(s) that you’d like to re-enable.
5. Click “OK”.

After performing the above steps, the add-in / document-level customization should re-activate in the host application, and also show up in the Control Panel’s “Add or Remove Programs” list.


Comments

  1. Hi Pradeep,

    Good you consolidated all the Main errors. Have you worked on resigning the bootstrapper "setup.exe" after modifying the "setup.exe" with /url parameter ?

    Regards,
    Ravneet

    ReplyDelete
    Replies
    1. Hi Ravneet,

      Are you refering to timestamp server URL? I have not worked on that. Thanks!

      Delete
  2. Hi Pradeep,

    Yes, I was referring to timestamp server URL. In other words digital signing of the bootstrapper("setup.exe") with the valid certificates from trusted authority after modifying "setup.exe" with /url parameter.

    ReplyDelete

Post a Comment

Feedback - positive or negative is welcome.

Popular posts from this blog

How to prepare your LOB app for Intune?

Information Architecture - Setup your term store to scale

Generate token signing .CER from ADFS Federation Metadata XML