Defining multiple values in DefineConstants in MsBuild element?

Posted by Sardaukar on Stack Overflow See other posts from Stack Overflow or by Sardaukar
Published on 2009-02-03T10:50:48Z Indexed on 2010/05/06 15:18 UTC
Read the original article Hit count: 1359

Filed under:
|
|

I'm currently integrating my Wix projects in MSBuild. It is necessary for me to pass multiple values to the Wix project. One value will work (ProductVersion in the sample below).

<Target Name="BuildWixSetups">
    <MSBuild Condition="'%(WixSetups.Identity)'!=''"
    			Projects="%(WixSetups.Identity)"
    			Targets="Rebuild" Properties="Configuration=Release;OutputPath=$(OutDir);DefineConstants=ProductVersion=%(WixSetups.ISVersion)" ContinueOnError="true"/>
</Target>

However, how do I pass multiple values to the DefineConstants key? I've tried all the 'logical' separators (space, comma, semi-colon, pipe-symbol), but this doesn't work.

Has someone else come across this problem?

Solutions that don't work:

  1. Trying to add a DefineConstants element does not work because DefineConstants needs to be expressed within the Properties attribute.

© Stack Overflow or respective owner

Related posts about msbuild

Related posts about msbuild-task