views:

43

answers:

1

Hi..

I am using WIX tool for creating installation file for our project.

I want to have the dynamic(incremental) build number. So can anyone please guide me.

Please dont provide solution like 1.0.0.* as this gives any dynamic number at end. I want it incremental like 1.0.0.1, 1.0.0.2, 1.0.0.3,.....

A: 

You can't do this with WiX natively.

What you can do however, is define your version as a variable. e.g.:

<Product Id="*"
         UpgradeCode="$(var.Property_UpgradeCode)"
         Name="!(loc.ApplicationName)"
         Language="!(loc.Property_ProductLanguage)"
         Version="$(var.version)"
         Manufacturer="!(loc.ManufacturerName)" >

Then you can pass in the version number on the command line. Here's an example using Nant

<candle
          out="${dir.obj}\"
          rebuild="true"
          extensions="WixUIExtension;WixNetFxExtension">
            <defines>
                <define name="ProcessorArchitecture" value="${release.platform}" />
                <define name="SourceDir" value="${dir.source}" />
                <define name="version" value="${version}" />
                <define name="releasetype" value="${release.type}" />
                <define name="Language" value="${language}" />
            </defines>

            <sources>
                <include name="*.wxs" />
            </sources>
        </candle>

Then you just handle the version number in the same way you do for your application :)

sascha