Hello Oleg,
That I am already doing. Please look at the upgrade bundle code -
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("1.1.0.0");
bootstrapper.UpgradeCode = new Guid("6f330b47-2577-43ad-9095-1861bb25844b");
bootstrapper.Application = new SilentBootstrapperApplication();
bootstrapper.PreserveTempFiles = true;
bootstrapper.Build("MyProduct.exe");
}
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("1.1.0.0");
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 1.0.0.0 and the MSI's project.GUID is different for both versions. I've kept the UpgradeCode same.