9

I need to constantly release a new executable with modifications to send to the end user. The Set-UP Projects Properties are set to

RemovePreviousVersion = True
DetectNewerInstalledVersion = True

When I release a new build, I increment the Version AND change the Product Code.

(Since I am using Visual Studio 2010 - when you increment the Version it automatically changes the product code, but I've tried to change it manually also).

When the build is done - the previous version doesn't uninstall.

The settings are below:

Set-up Project Properties in visual studio 2010 ultimate

EDIT: After some more research I've found that fileVersion of the project also needs to be increased. I've done so in the AssemblyInfo.cs

[assembly: AssemblyVersion("0.0.0.2")]
[assembly: AssemblyFileVersion("0.0.0.2")]

Both versions were 0.0.0.1 . After rebuilding - same issue.

Any ideas on how to get this work?

Heena Goyal
  • 382
  • 3
  • 17
Sam
  • 946
  • 3
  • 11
  • 22

1 Answers1

5

I have run into this also. What I found is the change has to be something greater than a change of the Revision Number. At the Minimum it needs to be the Build.

Major Version.Minor Version.Build Number.Revision

So in Your Case:

[assembly: AssemblyVersion("0.0.2.0")]
[assembly: AssemblyFileVersion("0.0.2.0")]
Mark Hall
  • 53,938
  • 9
  • 94
  • 111
  • This solution does not help me... i increase assembly version, assembly file version, version in setup properties. When i install, it looks like it removes previous version, but it removes icon, item from start menu and leaves files in Program Files. – JNM Apr 12 '13 at 09:36
  • @JNM Then you have something else wrong, try making sure your files are not set to permanent in their property box, also make sure you change the version in the setup property's and you let it generate a new ProductCode. – Mark Hall Apr 12 '13 at 14:49