0

I want to specify the dll path according to the project configuration. I added my project to Installer references.

enter image description here

enter image description here

Alex
  • 1,013
  • 1
  • 13
  • 27

2 Answers2

1

If you searched for the error (Undefined preprocessor variable) instead, you would have found a lot of answers on that topic, like https://stackoverflow.com/a/47594208/1331719

For your particular case edit the DefineConstants and add Configuration=$(Configuration) in all your configurations.

<DefineConstants>Configuration=$(Configuration)</DefineConstants>

UPDATE:

If you are not building against a wixproj then set the variable in the candle.exe command line with -d<Name>[=<value>]

candle.exe -dConfiguration=Release

IlirB
  • 1,410
  • 14
  • 19
  • I've added the candle.exe command line, if it doesn't work the perhaps you can share more of your project, especially your setup.build – IlirB Dec 15 '17 at 10:27
0

The WiX MSBuild targets provide that. If you're not using the WiX MSBuild targets, you have to provide it yourself.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47