views:

57

answers:

2

Is it possible to build an installer in Visual Studio that will not require the application to be uninstalled prior to installation? (Assuming the application was already installed.)

I use a Setup project in Visual Studio to create an installer for my Windows Forms (.NET) application. If the application has already been installed then this message is displayed when the installer is run:

Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."

Then the tedious procedure of opening the control panel and uninstalling is required.

The users of my application would like to have multiple installations of the application (e.g. some older known-to-work versions along with the newest development version). This is possible by renaming the existing installation folder prior to uninstallation and works fine. However is it possible to turn off the uninstallation requirement?

Platform: Visual Studio 2008.

+2  A: 

Just increment the version number with each build - it only needs to be the last part of the number (eg 1.2.3.456 )

Don't have a specific .Net implementation but the build script for my C++ app does this.

Martin Beckett
+1  A: 

Yes, change the value of property Version in the Setup project and allow property ProductCode to be changed. Note that this is separate from changing the four part version number of the solution's startup project, Solution Explorer/<select startup project>/Shift+F10 (or right click)/Application/Assembly Information/Assembly Version, corresponding to AssemblyVersion in file AssemblyInfo.vb.

How-to: menu View/Solution Explorer/<select setup project>/F4 (or menu View/Properties Window )/<change value of property Version>/Yes.

Note 1: the value of property Version needs to be in this format (without the quotes): '##.##.####'. Leading zeros can be left out and the last two parts are optional. Examples: '2', '2.1' and '2.14.941'. A four part version number leads to a build error.

Note 2: use of F4 to open the property page for the setup project is required. Using the context menu in Solution Explorer will open a configuration dialog instead.

Peter Mortensen