10

I am using WiX 3.7 to build an MSI. When I build my *.wixproj project, I get the following error:

error LGHT0204: ICE24: ProductVersion: '2014.1.1.4' is an invalid version string.

My company uses an unusual versioning convention where the release year is the major version. But according to this blog,

A version string has the format xxxxx.xxxxx.xxxxx.xxxxx where x is a digit. The maximum acceptable version string is 65535.65535.65535.65535.

If that is true, then why is ICE24 triggering on this product version?

Dan Jagnow
  • 1,175
  • 12
  • 28

1 Answers1

15

I'm answering my own question because I couldn't find any other coverage of ICE24 on StackOverflow. The MSDN documentation on ICE24 links to details about the ProductVersion property. Here's what it has to say:

The format of the string is as follows:

 major.minor.build

The first field is the major version and has a maximum value of 255. The second field is the minor version and has a maximum value of 255. The third field is called the build version or the update version and has a maximum value of 65,535.

So the problem is that my major version (2014) exceeds the maximum value of 255.

The fourth digit is not a problem. According to MSDN:

Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.

So the moral of the story is to keep your major and minor version numbers small. Hope this helps someone else!

Dan Jagnow
  • 1,175
  • 12
  • 28
  • Okay, so you've found that you can't adopt a version labeling scheme and apply it everywhere. But you might not have to change it. An MSI's ProductVersion is restricted and Windows Installer does copy it to the DisplayVersion field of the product's Uninstall key in the registry. But DisplayVersion is a free format string. So what I do is to have Windows Installer mark its entry as hidden (see ARPSYSTEMCOMPONENT) and create my own with a custom action. You just have to be careful with custom actions to make sure to handle the install, uninstall, upgrade, rollback phases of installation. – Tom Blodget Nov 27 '13 at 23:47
  • 1
    All that just to disregard the rules? I'd rather have a reliable installer. – Christopher Painter Nov 28 '13 at 01:01
  • There is no rule for ARP's DisplayVersion. The advantage is that the "product version" is free to be meaningful to the publisher, users and support staff. The version of an MSI file is analogous to the version of a DLL. It shouldn't bleed into the UX space. – Tom Blodget Nov 28 '13 at 15:31
  • 1
    Using similar versioning. I changed the year to two/three digit to make msi happy (14.1.1.4 instead of 2014.1.1.4). We are good till year 2255... – apr Jan 04 '19 at 13:54