Defining Wix properties and values based on VS active configuration

前端 未结 3 664
一生所求
一生所求 2021-02-05 18:06

How can I define Wix properties and values that change depending on which Visual Studio configuration is active? e.g. For our release build, var x = 1 and for the export build,

3条回答
  •  孤城傲影
    2021-02-05 18:25

    You can use Project Reference Variables for that. No need to specify constants.

    Sample steps:

    1. Add a project reference (of the application) to your setup project

    Right Click 'References', 'Add References'

    1. Use project reference values in your wxs file

    $(var.ProjectName.Configuration)

    
      
    
    

    Resources:

    Complete list of Candle preprocessor variables

    Using Project references and variables

提交回复
热议问题