[wix-users] Use PreProcessor variable in BeforeBuild action

Brian Enderle brianke at gmail.com
Fri Nov 6 04:59:12 PST 2015


I have the following defined in my wixproj file:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86'
">
     <OutputPath>bin\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
     <DefineConstants>Debug;BuildVersion=1.1.1</DefineConstants>
     <WixVariables>BuildVersion2=2.2.2</WixVariables>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release|x86' ">
     <OutputPath>bin\</OutputPath>
     <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
     <DefineConstants>BuildVersion=1.1.1</DefineConstants>
     <WixVariables>BuildVersion=2.2.2</WixVariables>
  </PropertyGroup>


Is there a way to use either 'BuildVersion' or 'BuildVersion2' in a
BeforeBuild action?  Something like:

   <AssemblyInfo AssemblyVersion="$(var.BuildVersion)" />

or

   <AssemblyInfo AssemblyVersion="$(var.BuildVersion2)" />


TIA

Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein


More information about the wix-users mailing list