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

New Post: Minor Upgrade

$
0
0
The same (older) upgrade XML elements that used for MinorUpgrade scenario is used by the Project.MajorUpgradeStrategy member:
project.MajorUpgradeStrategy =  new MajorUpgradeStrategy
{
    UpgradeVersions = VersionRange.OlderThanThis,
    PreventDowngradingVersions = VersionRange.NewerThanThis,
    NewerProductInstalledErrorMessage = "Newer version already installed",
};
//-------------
project.MajorUpgradeStrategy =  new MajorUpgradeStrategy
{
    UpgradeVersions = new VersionRange 
                          { 
                             Minimum = "2.0.5.0", IncludeMaximum = true,
                             Maximum = "%this%", IncludeMaximum = false
                          },
    PreventDowngradingVersions = new VersionRange 
                          { 
                             Minimum = "%this%", IncludeMinimum = false
                          },
    NewerProductInstalledErrorMessage = "Newer version already installed",
};
Wix# intention was always to provide MajorUpgrade support only. Thus Project.MajorUpgradeStrategy was eventually superceded with the Project.MajorUpgrade directly mapped to the WiX MajorUpgrade element. However the MajorUpgradeStrategy member is still available and there is a small chance that you can modify it to meet your requirements for MinorUpgrade. See MajorUpgrade sample for details.

Viewing all articles
Browse latest Browse all 1354

Trending Articles



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