Passing multiple values to Wix DefineConstants property with MSBuild

后端 未结 12 1977
萌比男神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条回答
  •  隐瞒了意图╮
    2020-12-08 05:59

    You could pass it as parameter, not constant. The code will look like this:

    
    

    Now in WiX project add a constant:

    BuildVersion=$(ProductVersion)
    

    And use it in *.wxs file where needed:

    $(var.BuildVersion)
    

    For instance:

    
    

    This will work with multiple parameters.

提交回复
热议问题