Passing multiple values to Wix DefineConstants property with MSBuild

后端 未结 12 1994
萌比男神i
萌比男神i 2020-12-08 05:42

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 b

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 06:20

    I know MSDN docs are full of errors and sometimes misleading: here is what it says about DefineConstants

    Defines conditional compiler constants. Symbol/value pairs are separated by semicolons and are specified by using the following syntax:

    symbol1 = value1 ; symbol2 = value2

    The property is equivalent to the /define compiler switch.

    http://msdn.microsoft.com/en-us/library/bb629394.aspx

    According to MSDN, you can 1. define multiple constants and 2. (@Sayed) assign values

    HOWEVER I could not get the expected behaviour of this property of the MSBuild task to work as expected and recommend Jeff Winn's workaround, and his post should be marked as the answer.

提交回复
热议问题