RemovePreviousVersions in VS Setup Project doesn't appear to work?

Sam 21 Reputation points


I'm trying to understand the setup project a bit more as on the surface of it, it appears to be working. I've set "RemovePreviousVersions" to true and have changed the Version number from 3.2.11 to 3.2.12. Hit "Build" and then test the install file.

Everything installs (or so it would seem) I check the Add and Remove Programs and sure enough the application is there with the new 3.2.12 number having previously been 3.2.11.

Go to the desktop shortcut on my desktop which I had added in the File System of the setup in both the User's Desktop and User's Programs Menu and NOPE. This opens up the previous version 3.2.11 (I have the build name manually added in myself on the main winform to keep tabs). I go to the installation location and the files are the old 3.2.11 version, no sign of the 3.2.12 despite the fact that it says its installed in the Add and Remove Programs.

Any help would be appreciated, losing my mind over this!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,420 questions
{count} votes

Accepted answer
  1. RLWA32 38,856 Reputation points

    You didn't indicate if you change the version number in both the setup project AND the installed file. They are both needed.

    To be clear, when you open the Assembly Information dialog from the project properties you must change the File Version number.

3 additional answers

Sort by: Most helpful
  1. juliediane 6 Reputation points

    @Sam-3411I am having the same question.

    1 person found this answer helpful.
    0 comments No comments

  2. RLWA32 38,856 Reputation points

    When you change the version number of the setup project from 3.2.11 to 3.2.12 you should allow the product code to be changed also. And, you must also change the file version number of your assembly from 3.2.11 to 3.2.12.

    0 comments No comments

  3. Sam 21 Reputation points

    Thanks for taking the time to answer @RLWA32 , when changing the version code I get prompted to change the ProductCode which I agree to and it changes the ProductCode automatically. Continue building and installing as I've previously described and the same issue occurs, any ideas?