VS 2010 setup project does not uninstall previous versions

I am using a setup project in VS 2010 to install a Windows Forms Application I have created. The setup project works fine, however, if I update the app and change the version number and update code of the setup project, it does not update the app on the user's machine when the setup project starts again. It will follow the installation steps and say the installation was successful, but the application on the user's computer remains the same and is not a new version. Oddly enough, if you run the setup project again, an error pops up stating that this version of the application is already installed and that you must use the add / remove programs to remove the current version in order to proceed with the installation. Has anyone else experienced this issue before. I heard,that it might not be possible with a setup project in VS 2010, but I hope it is not, as this method works fine for me except for this problem.

+3


source to share


1 answer


You don't have to change the property UpgradeCode

, it will have the effect you see:

Attention!

UpgradeCode should only be installed for the first version; it should never change for subsequent versions of the application and should not change for different language versions. Changing this property will cause the DetectNewerInstalledVersion and RemovePreviousVersions properties to work correctly .



(via https://wayback.archive.org/web/20121029130031/https://msdn.microsoft.com/en-us/library/465253cd(v=vs.100).aspx )

Assuming you want to uninstall the old version and replace it with the new one (as opposed to having them installed side-by-side, which is actually what you are doing), you should change Version

(both the MSI and the updatable file) and ProductCode

( from MSI) and install RemovePreviousVersions

on True

.

+7


source







All Articles