I have developed the windows service and created the MSI installer using Wix toolset, then distributed to users. it is working as expected. Let's name this msi as version 1.0.0.0
Now, it's time to deliver a new build with service enhancements. Hence, I have created a new msi. Let's name it version 2.0.0.0 . I was hoping that the execution of new msi shall upgrade the existing application.
But I get below error, basically, it's unable to start the service
Here is the code from 1.0.0.0
<?define UpgradeCode = "{3D197FE4-86DF-31FD-A0CD-21B5D3B97ABC}" ?>
<Product Id="$(var.ProductCode)"
Name="!(loc.ProductName_$(var.Platform)) $(var.ProductVersion)"
Language="!(loc.Language)"
Version="$(var.BuildVersion)"
Manufacturer="!(loc.Company)"
UpgradeCode="$(var.UpgradeCode)">
Here is the code from 2.0.0.0
<?define UpgradeCode = "{3D197FE4-86DF-31FD-A0CD-21B5D3B97ABC}" ?>
<Product Id="$(var.ProductCode)"
Name="!(loc.ProductName_$(var.Platform)) $(var.ProductVersion)"
Language="!(loc.Language)"
Version="$(var.BuildVersion)"
Manufacturer="!(loc.Company)"
UpgradeCode="$(var.UpgradeCode)">
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)"
Schedule="afterInstallInitialize"/>
If you observe, I kept the upgradecode same as 1.0.0.0. As per https://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html
If I change the upgradecode GUID then I do not see any issues. Installation works fine. But changing the upgradecode guid will not remove the old build during upgrade. I mean, i see both 1.0.0.0 and 2.0.0.0 in control panel.It's installing one more version side by side :(
How can I come out from this issue?
