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?