Reputation: 223
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:
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?
Upvotes: 3
Views: 4493
Reputation: 1924
Why don't you plant a custom action to backup and delete previous installation folder for additional safety :)
Upvotes: 0
Reputation: 223
I've finally found the answer actually, and I'll post it here for people who stumble across this. Here's the one step I was missing:
You need to go to Properties > AssemblyInfo.cs in your project and update the AssemblyVersion and AssemblyFileVersion numbers. Otherwise your EXE for this project won't actually update. Hope this helps!
Upvotes: 8