|
I have a .NET 2.0C# application build using Visual Studio 2008. As part of the setup I want to remove the program if it iscurrentlyinstalled on the computer. I did not want the user to go to 'add/remove programs' and do it manually. I wanted the to be part of the setup.
I found referrences to a 'RemovePreviousVersions' property setting in the Setup project. I can not find this property setting.
Where do I find this setting? Is this what I should use or is there a better solution?
- Moved byYiChun ChenMSFTFriday, May 15, 2009 7:41 AMDeployment issue (From:Visual Studio Setup and Installation)
-
| | David421 Wednesday, May 13, 2009 2:24 PM | Hi David,
This property can do what you're looking for.
If you haven't already, add a setup project to the solution, then click the Setup project node in Solution Explorer.In the Setup Deployment Project properties window below Solution Explorer, you should see the RemovePreviousVersions property. The default value is False, just change it to True.
HTH, - Kemp Brown [MSFT]- Proposed As Answer byKemp Brown[MSFT] Wednesday, May 13, 2009 6:12 PM
- Marked As Answer byKira QianMSFT, ModeratorMonday, May 18, 2009 1:38 AM
-
| | Kemp Brown[MSFT] Wednesday, May 13, 2009 6:12 PM | Hi David421,
Yes, RemovePreviousVersions can meet your needs. You can follow Kemp Brown's step to find and set it. When a new version of your application is going to be built. You should raise the version number of the assembly as well as the setup version. So the built setup package can be installed to the user's computer without forcing them to uninstalled the previous from Add/Remove program window.
If you have anything unclear, please feel free to tell me.
Sincerely, Kira Qian
Please mark the replies as answers if they help and unmark if they don't. - Marked As Answer byDavid421 Friday, May 15, 2009 2:05 PM
-
| | Kira Qian Friday, May 15, 2009 7:22 AM | Hi David,
This property can do what you're looking for.
If you haven't already, add a setup project to the solution, then click the Setup project node in Solution Explorer.In the Setup Deployment Project properties window below Solution Explorer, you should see the RemovePreviousVersions property. The default value is False, just change it to True.
HTH, - Kemp Brown [MSFT]- Proposed As Answer byKemp Brown[MSFT] Wednesday, May 13, 2009 6:12 PM
- Marked As Answer byKira QianMSFT, ModeratorMonday, May 18, 2009 1:38 AM
-
| | Kemp Brown[MSFT] Wednesday, May 13, 2009 6:12 PM | So how will this work? With this set to 'true' I will then rebuild the project to create a new msi file. When i run setup to install this latest build, will i get an error or will i get a prompt that this program is already installed on my computer? Do i get the option to cancel or continue...continue will remove the old version and install this latest build?
Is that how it will work?
| | David421 Wednesday, May 13, 2009 7:00 PM | Hi David421,
Yes, RemovePreviousVersions can meet your needs. You can follow Kemp Brown's step to find and set it. When a new version of your application is going to be built. You should raise the version number of the assembly as well as the setup version. So the built setup package can be installed to the user's computer without forcing them to uninstalled the previous from Add/Remove program window.
If you have anything unclear, please feel free to tell me.
Sincerely, Kira Qian
Please mark the replies as answers if they help and unmark if they don't. - Marked As Answer byDavid421 Friday, May 15, 2009 2:05 PM
-
| | Kira Qian Friday, May 15, 2009 7:22 AM | Hi David421, I am moving this thread from Base "Visual Studio Setup and Installation" forum to the "ClickOnce and Setup & Deployment Projects" forum, since the issue is related to deployment. There are more deployment experts in the "ClickOnce and Setup & Deployment Projects" forum. Thanks
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. | | YiChun Chen Friday, May 15, 2009 7:40 AM | This is how you find the RemovePreviousVersions property setting.
If you right-click on your Setup and Deployment project in Solution Explorer and select properties you will get a Property Pages dialog which has no RemovePreviousVersions setting. If however you click on your Setup and Deployment project and then click on the properties tab (or click on Properties Window under the View menu option) a completely different set of properties will appear. This properties window has the RemovePreviousVersions setting and many other settings related to setup and deployment.
Test Engineer | | skinned_knuckles Saturday, July 25, 2009 9:57 PM |
|