Question

I have built an MSI that I would like to deploy, and update frequently. Unfortunately, when you install the MSI, and then try to install a newer version of the same MSI, it fails with a message like "Another version of this product is already installed. Installation of this version cannot continue..." appears. The MSI was built with a Visual Studio 2008 Setup Project. I have tried setting the "Remove Previous Versions" property to both true and false, in an effort to just make newer versions overwrite the older install, but nothing has worked. At a previous company I know I did not have this problem with installers built by Wise and Advanced Installer. Is there a setting I am missing? Or is my desired functionality not supported by the VS 2008 Setup Project?

Was it helpful?

Solution

I have built numerous MSIs with VS 2005 Pro that do this correctly.

Are you sure that the 'Version' property of the deployment project has been incremented? This property is independent of the version of the assemblies in the application, and this is the error message you will see if the Version property of the MSI is the same as it was for the one you are trying to overwrite.

OTHER TIPS

Increment the version number on your project.

In VS, select the node for your setup app and hit F4 to view the properties. Find the version field, and increment it.

You need to change the ProductCode between each version, if you don't do this you will get the behavior you are seeing. The ProductCode is seen in the project properties. Check out the MSDN Online Help for ProductCode to understand better.

This is little more complex:

To automatically remove previous versions of installed application in Setup Project, it is needed to:

  1. Increment the Version property (e.g. from 1.0.0 to 1.0.1 ... also change on 3rd position works)
    • Version is the property of installer project that identifies, which version of application is installed
  2. Change the ProductCode property, so installer knows that it is not the same installer executed twice
    • ProductCode is the property of installer project, Visual Studio offers to automatically change it, when Version property is changed
  3. Keep the value of "UpgradeCode" property.
    • UpgradeCode is also the property of installer project
    • it needs to stay the same among entire "upgrade line", so installer knows what to upgrade
  4. If you also want to remove old application versions from Control Panel's list of software, set RemovePreviousVersions to true

Had the same problem when going from XP to Win7. To solve it I had to set DetectNewerInstalledVersion to False. Also, as mentioned by others, you need to inc the version of the setup project.

Good luck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top