-
Notifications
You must be signed in to change notification settings - Fork 433
Wix Versioning
WIX is a very flexible tool, hence my Wix versioning task has to make some assumptions over the way it will be used.
This file contains the definition of the various version number parts. Note that it shows the separate parts and the fully built four part 1.0.0.0 number.
<?xml version="1.0" encoding="utf-8"?>
<!-- Note that this file will be overridden by the build server. -->
<Include>
<?define MajorVersion = "1" ?>
<?define MinorVersion = "0" ?>
<?define BuildNumber = "0" ?>
<?define Revision = "0" ?>
<?define FullVersion = "1.0.0.0" ?>
<!--WiX Installer Versions are Major.Minor.Revision -->
</Include>
This the file the task will be updating.
In our Wix product.wxs we need to include the InstallerVersion.wxi file and then can use the defined variables in the Version property in any way we wish, using the individual parts or the whole multi-part version number
<?xml version="1.0" encoding="UTF-8"?>
<?include InstallerVersion.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="WixProject" Language="1033" Version="$(var.FullVersion)" Manufacturer="Test"
UpgradeCode="510ca227-7d91-43f4-881c-13319a07b299">
... rest of file
In most cases all that is required to use this extension is to drop the Wix Versioning Task into your build process. All the defaults are correct for the assumptions above. The task will recursively look for installerversion.wxi and update them using the four part build number extracted from build number, as per all the other versioning tasks.