[wix-users] Incremental builds

Rob Mensching rob at firegiant.com
Fri Nov 4 10:16:35 PDT 2016


Overriding a Property from the command-line will not cause a project to be considered dirty. You need that Property to "physically" change something (part of path to select a file with newer timestamp, cause a task to run to modify a file, etc).

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Friday, November 4, 2016 7:58 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Incremental builds

I'm trying to get incremental builds working, and I am fairly certain this is a MSBuild problem not a wix problem.  I have a Wix project which is built using a CI server where a build number is passed to the project as a property.  I then use a DefineConstants element in the wixproj to pass my custom property to wix via a variable.

SomeApplication.wixproj /p: BuildNumber={CI variable syntax for the build}

And in the wixproj:
<VersionMajorMinor>1.0</VersionMajorMinor>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">2</BuildNumber> <ProductVersion>$(VersionMajorMinor).$(BuildNumber).0</ProductVersion>
    <DefineConstants>
      $(DefineConstants);
      ProductVersion=$(ProductVersion);
      BuildNumber=$(CIBuildNumber);
    </DefineConstants>

And finally in my Product.wxs, I consume the ProductVersion via:
<Product Id="*" Version="$(var.ProductVersion)" Name="..."

Is there some standard functionality in MSBuild I am missing to be able to say the build is dirty if a property changes? I know MSBuild looks at file timestamps to determin if a target is needed via the inputs and outputs, so what I am tinking I'd need to do is add a file for the DefineConstants, inject them into the compile DependsOnTargets, and then only write the file after reading the values and comparing them to the current DefineConstants if they are different. Shouldn't a DefineConstants change triggering a build be an intergral part of the wix targets?

Thanks,
Jacob


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list