Search code examples
visual-studio-2010windows-installerdevenv

Building a setup project through devenv.com is not working as expected


I am trying to build a large Visual Studio 2010 solution that contains some setup projects from the command line using the following:

devenv.com mySolution.sln /rebuild "Debug|Mixed Platforms" /out E:\myUser\Desktop\build.txt

The MSI files are generated fine. They actually work and install the application as they should be doing it. But here comes the problem: When a change is made on the code and then the solution is rebuilt following the process described before, the application installed by the new MSI does not contain any of the changes made in the code.

Do you have any comment that could help me understand what is happening?

Thanks in advance.


Solution

  • You can't just rebuild an MSI file and install it when that MSI setup has already been installed. You need a RemovePreviousVersions upgrade (increment the version of the setup project in its properties window and say yes to the answers).

    This might be useful: https://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

    it still applies except that you must also increment the file versions of the binaries in your setup for them to be updated during the upgrade.