How can I lift the requirement to uninstall before installation of a .NET application built with Visual Studio?
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: Visua开发者_JAVA百科l Studio 2008.
Just increment the version number with each build - it only needs to be the last part of the number (for example, 1.2.3.456)
I don't have a specific .NET implementation, but the build script for my C++ application does this.
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.
精彩评论