I want to write an msi installer that uninstalls the previous version when it is run. I have a setup project in VS 2013 with DetectNewerInstalledVersion=True and RemovePreviousVersions=True. Here is what I do:
- I change the version number (eg from 1.0.3 to 1.0.4).
- I make sure the ProductCode changes and the UpgradeCode does not.
- I right click the setup project and click Build.
- I run the msi file in the Debug folder.
The msi runs just fine, but the old EXE is still in the programs folder. It successfully installs the program if it's a fresh installation though. What am I doing wrong?