Sohail Somani recently asked on the WiX-Users List:
I’m currently in the middle (or nearing the end, I hope) of porting an installer from the evil that shall not be named to WiX.
Mostly, it’s been pretty easy. However, one thing which is sticking out is the version number. The products being ported use the current year as the major version number and this means strings like “2011.foo.bar”.
…Is there a simpler way to exceed the limits…?
The tool ( let me guess: InstallShield ) Sohail used to use isn’t the evil, it’s how it was used that is incorrect. Over my many years of writing installs I’ve seen this situation happen over and over:
(I’ll use one real world example to illustrate how absurd this really can get when you let functionals try to drive the decision without consulting technical resources. Seriously…. don’t ask )
Release Manager: I need the product version to be DMLSS_V3.00.01.A.01.10
Setup Developer: I am sorry, I can only do x.x.x.x with certain upper and lower bounds for each field.
Release Manager: That’s crazy, the install shouldn’t dictate what I choose. You must make it what I say.
However, certain the release manager is about how things must be done to meet his ‘special’ business needs ( aren’t they always? ), the MSI SDK is quite clear on the definition of the ProductVersion property:
The format of the string is as follows:
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.
The old tool allowed this violation ( usually without much real life harm, perhaps some problems doing Major Upgrades ) but WiX simply doesn’t allow it. I think that’s a good thing because it helps the install developer when he needs to tell management:
Setup Developer: I’m sorry, I can display your custom version scheme on the dialog but I cannot possibly assign it to the ProductVersion.
Instead it looks like Sohail is just looking for a way around MSI to make the release manager happy. I understand that pressure but personally I never tolerate it. I suppose that’s partly why I change jobs so often. Still, it can get better as evidenced by the fact that I’ve been at my current employer for nearly two years now when the last time I worked for them I barely made it past a year. Push back hard enough and provide sound reasoning and eventually it will improve.