I'm trying to bind the file version from my exe file to be used as product version. Following: How can I set the WiX installer version to the current build version?
The problem is that my assembly builds in the format of e.g 2018.0.0.0. The major upgrade requires a version number of max 255, which means that I have to remove the first two numbers from my productVersion variable before setting it to the ProductVersion property. Is there a way to modify the variable through xsl or something else?.
Modifying through a custom action is no alternative since I want the property to be set in the msi file.
Any help in this djungle is appreciated,
<?define productVersion= !(bind.FileVersion.MyExe.Exe) ?>
<Product Id="*"
UpgradeCode="12345678-1234-1234-1234-123456789123"
Name="My Application"
Language ="1033"
Version="$(var.productVersion)"
Manufacturer="My Company" >