user2762084
user2762084

Reputation: 1

Obtaining whether debug or release is being built in Visual Studio 2008 in WiX

Is it possible to get hold of the flavour of the EXE file being built in the Visual Studio 2008 environement?

Basically, I wish to do the following

<File Id="EventWatcher.exe" Name="EventWatcher.exe" KeyPath="yes" 
    DiskId="1" Source="..\EventWatcher\bin\$(sys.BUILDARCH)\EventWatcher.exe">
</File>

But instead of getting x86 for BUILDARCH I wish to get the word Release or Debug.

Upvotes: 0

Views: 700

Answers (1)

Isaiah4110
Isaiah4110

Reputation: 10080

Assuming your WiX project is part of the same solution, you can use the following variable:

Usage:

var.<ProjectName>.Configuration

Example Usage:

$(var.MyProject.Configuration)

Sample values:

Debug or Release

Check Complete list of Candle preprocessor variables for other variables available and more details.

Upvotes: 1

Related Questions