Upgrade through Managed BA keeps the older version entry in ARP

Dec 10, 2015 at 8:42 AM

I have created two BAs for two different versions of the product. When I upgrade the older version using BA, it keeps the older version's entry in ARP. But if same steps are performed using only .msis which are bundled in BAs, this issue doesn't occur.

Dec 10, 2015 at 11:48 PM
Try to increment Bundle.Version.
Dec 11, 2015 at 3:20 AM
Hello Oleg,

That I am already doing. Please look at the upgrade bundle code -
    class Program
        static void Main()
            string productMsi = BuildMsi();

            var bootstrapper =
              new Bundle("MyProduct_1",
                  new PackageGroupRef("NetFx40Web"),
                  new MsiPackage(productMsi) { DisplayInternalUI = true });
            bootstrapper.Version = new Version("");
            bootstrapper.UpgradeCode = new Guid("6f330b47-2577-43ad-9095-1861bb25844b");
            bootstrapper.Application = new SilentBootstrapperApplication();
            bootstrapper.PreserveTempFiles = true;

        static string BuildMsi()
            var project = new Project("MyProduct_1",
                             new Dir(@"%ProgramFiles%\My Company\My Product",
                                 new File("Program.cs")));

            project.GUID = new Guid("6fe30b47-2577-43ad-9095-1861ba25889a");
            project.UpgradeCode = new Guid("6f330b47-2577-43ad-9095-1861bb25844b");
            project.Version = new Version("");

            project.MajorUpgrade = new MajorUpgrade()
                AllowDowngrades = false,
                DowngradeErrorMessage = "Lower version",
                AllowSameVersionUpgrades = false,
                Schedule = UpgradeSchedule.afterInstallValidate

            return project.BuildMsi();
The version of older bundle and msi is and the MSI's project.GUID is different for both versions. I've kept the UpgradeCode same.
Dec 11, 2015 at 8:00 AM
Hi Aakash,

It's hard for me to see what is wrong with your sample. Nothing that I can peek.

Though I just coded the "BA upgrading" sample. The testing showed that it behaves as it should. The sample is committed and you can use it as a bench mark:
https://wixsharp.codeplex.com/SourceControl/latest#src/WixSharp.Samples/Wix# Samples/Bootstrapper/WixBootstrapper/setup_upgrade.cs

Most likely there will be some little thing that makes your sample behave differently.