Reputation: 14352
I want to blow away the already installed version of my app without bothering the user to uninstall before installing a new version.
Here are the Deployment Project Properties that I have set:
AddRemovePrograms Icon(Icon)
Author Justin Tanner
Description
DetectNewerInstalledVersion False
InstallAllUsers True
Keywords
Localization English (United States)
Manufacturer Company Name
ManufacturerUrl
PostBuildEvent
PreBuildEvent
ProductCode {3F401BEF-4A95-48AE-A79F-FBB60E90E26A}
ProductName Utility App
RemovePreviousVersions True
RunPostBuildEvent On successful build
SearchPath
Subject
SupportPhone
SupportUrl
TargetPlatform x86
Title Utility App
UpgradeCode {B2DC1E38-5605-4CC7-A815-2E1F9D7EDE41}
Version 1.0
Upvotes: 3
Views: 1554
Reputation: 9757
Change the Version
property of your installer setup project.
After making this change, visual studio will say It is recommended that the ProductCode be changed if you change the version. Do you want to do this?
Choose Yes
.
The installer created after the version and ProductCode update will automatically "upgrade" previously installed versions prior to the version update.
Unfortunately, I don't know how to configure the setup project to update the version and product code on every build to avoid having to remember to make such changes between every deployment.
Upvotes: 6
Reputation: 4503
If you want to just run the uninstall operation then select your installer project and go to properties and then set RemovePreviousVersion = True...
Upvotes: 0