Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Setup Project doesn't upgrade to new program

Ok, here are the steps I've taken...

Create and customize Setup project

Set Setup project Version=1.0.0
Build Setup project
Install version 1.0.0
Run program, which displays "v1.0.0" in the Window's Title bar

Change code in program to display "v1.0.1" in the Window's Title bar
Set Setup project RemovePreviousVersions=True
Set Setup project Version=1.0.1
Change ProductCode (as prompted)
Build Setup project
Install version 1.0.1
Run program, which displays "v1.0.0" in the Window's Title bar

The new installer installed the old version of the software. In the control panel's "Programs and Features" (this used to be "Add/Remove Programs") it shows that version 1.0.1 is installed. I've been through more than one tutorial, like http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

When you’re ready to build a new version of your product to replace an older one, follow these steps:

  • Increment the version property (see Figure 1). Visual Studio displays a message box that prompts you to change the ProductCode and PackageCode. Select yes.
  • Set the RemovePreviousVersions property to true.

Setting the RemovePreviousVersions property to true removes previous versions of the product from the system as you install the new version. Since products are identified by the ProductCode Guid, changing the ProductCode creates a new product. That is, the old product is uninstalled as you install a new one.

If I manually remove 1.0.0 from the Control Panel, and then install 1.0.1, then the program runs showing "v1.0.1" properly.

What am I missing here?

like image 967
epalm Avatar asked Apr 08 '11 20:04

epalm


Video Answer


3 Answers

Have you update the file version number in your resource file too?

http://msdn.microsoft.com/en-us/library/6fkzft86.aspx

like image 53
Stephen Gennard Avatar answered Oct 28 '22 03:10

Stephen Gennard


I recently had this exact same problem and figured out the solution by trial and error. Even though your setup project has been incremented correctly you also need to increment the Assembly Version which can be found in the Assembly Information section of Project Properties.

like image 25
Vaughanabe13 Avatar answered Oct 28 '22 01:10

Vaughanabe13


Realise this is old but I have just had the exact same problem.

I resolved it by updating the assembly and file versions for all projects (rather than just the exe as I had done previously).

like image 33
wlf Avatar answered Oct 28 '22 01:10

wlf