Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Upgrades out of order?

$
0
0
Sweet it works!

This is what I have done:
        VersionRange upgradeVersions = new VersionRange
        {
            Minimum = "0.0.0.0",
            Maximum = "99.99.99.99",
            IncludeMinimum = true,
            IncludeMaximum = true,
        };

        VersionRange downgradeVersions = new VersionRange
        {
            Minimum = "99.99.99.99",
            Maximum = "0.0.0.0",
            IncludeMinimum = true,
            IncludeMaximum = true,
        };

        wixProject.MajorUpgradeStrategy = new MajorUpgradeStrategy
        {
            UpgradeVersions = upgradeVersions,
            PreventDowngradingVersions = downgradeVersions,
            NewerProductInstalledErrorMessage = "Newer version already installed"
        };

        wixProject.MajorUpgradeStrategy.RemoveExistingProductAfter = Step.InstallInitialize;
... with this every install will remove any other version of the software before reinstalling (although I have not yet tested minor revisions) whether if it is older or newer.
Something to note is that the "NewerProductInstalledErrorMessage = "Newer version already installed"" property is required even though it does not apply in this case.
If not specified, you get a compile error.

Keep up the good work Oleg!

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>