Visual Studio Packaging: Another version of this product is already installed

32,123

Solution 1

I would follow this process

In your main project

  • Increment your Assembly Version no.

In your Visual Studio Setup project

  • Set "Remove Previous Version" to true
  • Increment the Version No. (this will change the product code for you too)

Solution 2

steps to solve the error:

  1. Execute the following command from command prompt:

msiexec /i program_name.msi /lv logfile.log

where program_name.msi is the new version

/lv is log Verbose output

  1. open up the logfile.log in the editor

  2. find the GUID in the log

I found it in the following:

Product Code from property table before transforms: '{GUID}'

  1. execute the msizap following command from the visual studio command prompt if you already have installed or get it from Microsoft website

    Windows SDK Components for Windows Installer Developers

msizap.exe TWP {GUID}

it did the trick and removed the installed service successfully.

Extract from [SOLVED]Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel]2

Solution 3

You must specify the UpgradeCode and increment the ProductVersion to update a product. The UpgradeCode will remain the same for newer versions.

The UpgradeCode property indicates a family of related applications consisting of different versions and different language versions of the same product.

This article explains the ProductCode, ProductVersion and UpgradeCode:

http://msdn.microsoft.com/en-us/library/aa370837%28v=VS.85%29.aspx

Solution 4

Open Setup Project Properties Click ProductCode .. New Code Click UpgradeCode .. New Code Rebuild and Install

Share:
32,123
Sam
Author by

Sam

Updated on January 02, 2020

Comments

  • Sam
    Sam over 4 years

    I have a msi created for a project which uses C# & Jscript. version-1.0 is currently public. I want to release a bug-fixed version v-1.0.1 of this package but while testing it, I am getting "Another version of this product is already installed Installation of this version cannot continue.To configure or remove the existing version of this product, use Add/Remove program on the Control Panel".

    I want this bug-fixed version to install silently without asking user to uninstall and install new one. Please help me how can I achieve this, I am using visual studio 2008.

    Thanks in Advance!

    Sam

    Update: I have tried changing the package code but that creates two instances of the package using same working directory. Visual Studio geeks please help.

  • Sam
    Sam almost 14 years
    Following is what I have in my .vdproj file: "Name" = "8:Microsoft Visual Studio" "ProductCode" = "8:{8A3BC7ED-563E-42C1-ABEA-AAB14133E1AC}" "PackageCode" = "8:{24D081CF-EA46-4CA0-B3F7-D4DC60BC5FD8}" "UpgradeCode" = "8:{6F11B335-5F1E-4B4A-8565-6CCE50A8C599}" ... "ProductVersion" = "8:0.0.26" When I change the ProductVersion to "8:0.0.27" and build the msi. I still get the same 'Another version of this package....' message. Please Help!
  • Sam
    Sam almost 14 years
    Incremented the assembly version no [assembly: AssemblyVersion("1.0.3.7")] [assembly: AssemblyFileVersion("1.0.3.7")] for the main component of the package. Set the "RemovePreviousVersion" to "8:TRUE" Changed the version number to "1.0.3.7" from "0.0.28" The problem still persists.
  • Bernhard Hofmann
    Bernhard Hofmann almost 13 years
    I did this for a service, which it replaced, and now fails to install because the service is already registered. But of course the installation of the new version rolled back and removed it from the add/remove programs so I can't uninstall the original. InstallUtil to the rescue!
  • Derek
    Derek about 10 years
    This worked for me. Missed the part about "visual studio command prompt" at first, might be nice to bold that.
  • Ed Bayiates
    Ed Bayiates almost 10 years
    I used this for something non-VS related and you saved me hours of work. You can also say msizap TW (MSI name) to zap all from that MSI package!
  • Frank Tzanabetis
    Frank Tzanabetis about 9 years
    Probably not a good idea since you'll end up with multiple versions of the same thing installed - you want it to detect and uninstall the previous version.
  • Koo SengSeng
    Koo SengSeng over 7 years
    Save my day. In my case, I need to install the same service to different name and different connection strings. I have different display name and service name for each project. Changing the version number helps.
  • mma
    mma almost 7 years
    Isn't it a good idea to delete all items from the registry that contains the name of the assembly?
  • Kobbe
    Kobbe over 5 years
    In visual studio right clicking on the setup and choosing 'properties' is NOT the properties you want. You want to select the setup project and switch to the properties tab (or press F4).