I'm having some issues with custom actions not working properly (and causing broken installations) when trying to install a Debug build on top of a Release build, or vice-versa. Therefore I'd like to prevent such upgrades completely, and force the user to manually uninstall first.
So far I have this:
<?if $(var.Configuration) = Debug?>
<?define DisallowUpgrade = "yes"?>
<?else?>
<?define DisallowUpgrade = "no"?>
<?endif?>
<MajorUpgrade Disallow="$(var.DisallowUpgrade)" ... />
This forces the user to always uninstall first when installing a Debug build (which is fine). However it does not stop a Release build from trying to upgrade over a Debug build. How can I do this?
Thanks!
P.S. As I was typing I just thought of increasing the version number for Debug builds -- say by adding 100 to it. This would work, but could lead to confusion with QA people, so I'd prefer a cleaner way.