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

Sam 21 Reputation points
2021-11-26T10:54:08.807+00:00

Hi,

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.
2,436 questions
{count} votes

Accepted answer
  1. RLWA32 28,661 Reputation points
    2021-11-26T11:59:30.8+00:00

    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
    2021-11-26T12:04:45.847+00:00

    @Sam-3411I am having the same question.

    No comments

  2. RLWA32 28,661 Reputation points
    2021-11-26T11:47:22.36+00:00

    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.

    No comments

  3. Sam 21 Reputation points
    2021-11-26T11:53:32.017+00:00

    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?

    No comments