Question

I am using a setup project in VS 2010 to install a windows form application I have created. The setup project works great, however, if I update the application and change the version number and upgrade code of the setup project it does not update the application on the user's machine when the setup project is run again. It will go through the install steps and say that the installation was successful, however, the application that is on the user's computer remains exactly the same and is not the newer version. Oddly enough, if you were to run the setup project again an error will come up saying that this version of the application is already installed and that you must use the add/remove programs to remove the current version to continue with the installation. Has anyone else experienced this issue before. I have heard that this may not be possible using the setup project in VS 2010, but I am hoping that is not the case as this method has worked great for me with the exception of this issue.

Was it helpful?

Solution

You should not be changing the UpgradeCode property, this will have exactly the effect that you are seeing:

Caution

The UpgradeCode should only be set for the first version; it should never be changed for subsequent versions of the application, nor should it be changed for different language versions. Changing this property will keep the DetectNewerInstalledVersion and RemovePreviousVersions properties from working properly.

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

Assuming you want to remove the old version and replace it with the new one (as opposed to having them installed side-by-side, which is actually what you're doing) you should change the Version (of both the MSI and the file(s) being updated) and the ProductCode (of the MSI) and set RemovePreviousVersions to True.

OTHER TIPS

I encountered same problem.
and I resolved with changing those four.
(I used Visual Studio Community 2019)

[setup project]
・Version

[.Net project]
・Assembly Version
・Assembly File Version
・GUID

Change Assembly Info

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