0

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.

2 Answers 2

2

Why would a "user" ever know what a debug / release build is? IMO a user should only ever see a release build.

I would suggest build debug MSI and release MSI as two different products (upgrade code and even destination directory if you want side by side installs ) and a debug can only upgrade a debug and a release can only upgrade a release and only release MSIs ever go out the door to customers.

And of course, the less custom actions the better. :)

Sign up to request clarification or add additional context in comments.

2 Comments

Our debug builds include a bunch of extra features for internal testing; they don't go to customers. And we'd have to extensively rewrite our product to support side-by-side installs. Having them as two separate products would be fine; is it possible to do that while ensuring only one can be installed at a time?
Yes. Each Product could have a Upgrade entry using the detect only attribute for the other product's UpgardeCode. Then a launch condition that blocks installation if the opposite program is detected.
0

Write $(var.Configuration) to the registry, use RegistrySearch to load it, and use Condition to compare what's in the registry with the current value of $(var.Configuration).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.