0

I'm working on an old Visual Studio 2008 project which had a setup project. I have upgraded everything to VS2019 made the changes in the code, increased the version, added a few files and made the setup. A clean install is working perfectly.

When I first install the old version using the setup build in VS2008 and then run the new setup to upgrade this, things go freaky. The new setup will install all new files, and just before ending it removes all files that were overwritten. Only the files that did not exist will remain.

For example, the old setup places these files in the program file folder:

- program.exe   v1.0
- lib.dll       v1.0

Then the new setup will install these files, overwriting the old ones:

- program.exe   v2.0
- lib.dll       v2.0
- other.dll     v1.0
- info.txt      v1.0

Just before ending the install and enabling the [close] button, the folder contents changes to:

- other.dll     v1.0
- info.txt      v1.0

I have checked this on multiple computers (Win 10 down to Win 7) and used a filemon tool to make sure that the new files are actually installed and then removed. The Event log only shows a successful install. Starting the new setup again and choosing 'repair' will work and leave the files. So that is a workaround, but not the nicest one for many users.

A test with two VS2019 setup builds with different versions work correctly. The old VS2008 setups also worked correctly. So it appears to be an issue when upgrading a setup build with VS2008 with a setup build with VS2019.

Does anybody know how to fix this so that installation does not remove the files?

msoft
  • 579
  • 5
  • 21

1 Answers1

0

Okay, I had seen some VS2010 questions which looked the same. Solutions there seemed to be manually editing the msi file after the build. Far from optimal and I would assume that it was fixed by MS in VS2019.

Turns out that they have not "fixed" it, but allows Backward Compatible IDs to be used. I suddenly saw this option when going through the options panel again. Change to True:

BackwardCompatibleID

And this does solve my issue.

More info in this answer

This question can be deleted if someone thinks it's a duplicate. When you think it's helpfull I'll accept my own answer here for archive sake.

msoft
  • 579
  • 5
  • 21