0

I am getting the following warning in Visual Studio:

ICE61: This product should remove only older versions of itself. The Maximum version is not less than the current product.

I have found this answer on StackOverflow, but I can't apply what it says, my code only has this:

<Product Id="*" Name="Product Name" Language="1033" Version="1.0.0.2" Manufacturer="Ace Software" UpgradeCode="d2562e98-94df-8938-ba21-0967b39ed389">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MediaTemplate EmbedCab="yes" />

    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallFinalize" />
    </InstallExecuteSequence>

    <Property Id="PREVIOUSVERSIONSINSTALLED" Secure='yes' />

    <Upgrade Id="d2562e98-94df-8938-ba21-0967b39ed389">
      <UpgradeVersion Minimum="0.0.0.0"
                      IncludeMinimum="yes"
                      Maximum="100.100.100.100"
                      Property="PREVIOUSVERSIONSINSTALLED" />
    </Upgrade>

    <!-- other code ommited -->
</Product>

As you can see, I don't have a MajorUpgrade element where I can set the AllowSameVersionUpgrades to no.

How do I get rid of the warning? I don't really want to supress it, but actually fix the issue.

J86
  • 14,345
  • 47
  • 130
  • 228
  • MSI can recognize only 3 first digits of version, 4th digit is omitted, version `1.0.0.2` and `1.0.0.3` are recognized as the same. Also it's recommended to use `MajorUpgrade` element to allow upgrade. Look at the wix [documentation](https://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html) – Pavel Anikhouski Sep 12 '19 at 09:48
  • Thank you @PavelAnikhouski can you reply as answer please? So I can mark the question as answered. Your advice about using `MajorUpgrade` instead was awesome. It was much simpler and it worked. I also went down to `1.0.0` (3 number sections instead of 4). – J86 Sep 12 '19 at 10:18
  • 1
    [Just a link you can check for more help resources](https://stackoverflow.com/questions/57809294/winows-installer-wix-install-product-twice/57809491#57809491). – Stein Åsmul Sep 12 '19 at 10:32

1 Answers1

1

MSI can recognize only 3 first digits of version, 4th digit is omitted, version 1.0.0.2 and 1.0.0.3 are recognized as the same. Also it's recommended to use MajorUpgrade element to allow upgrade. Have a look at the major upgrade documentation

Pavel Anikhouski
  • 21,776
  • 12
  • 51
  • 66