9

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?

epalm
  • 4,283
  • 4
  • 43
  • 65

3 Answers3

10

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).

wlf
  • 3,086
  • 1
  • 19
  • 29
8

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.

Vaughanabe13
  • 81
  • 1
  • 2
3

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

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

Stephen Gennard
  • 1,910
  • 16
  • 21
  • I don't understand what that link is telling me. Should I be adding a new resource to each project in my solution? I can't find this Version Information Editor in Visual Studio. – epalm Apr 11 '11 at 15:51
  • Your .exe and .dll in the should have resource files linked into them. For managed code it is via the FileVersionInfo class and native it is via a .rc file. – Stephen Gennard Apr 12 '11 at 07:06