I am trying to pass the $(Configuration) macro as a parameter to an external tool (batch file), however, it apears to be empty. I tried by calling a simple test.bat that echo's the %1 parameter and pass the $(Configuration) macro as a param. Nothing is displayed however. Any ideas anyone
Asked
Active
Viewed 2,012 times
7
-
How exactly have you tried to pass it to the batch file? – Oded Jan 23 '12 at 21:22
-
In the add external tool window there is a parameters textbox, I just entered it in there. – Colin Jan 23 '12 at 21:24
1 Answers
1
$(Configuration)
is not listed as one of the defined IDE arguments that can be used when defining an external tool.
See this list for the defined ones - since $(Configuration)
is not listed, it is not something that can be used as an argument for an external tool.

Oded
- 489,969
- 99
- 883
- 1,009
-
@Colin - Not that I am aware of. Apart from the defined arguments, there is no way to make this dynamic. You _can_ define the external tool _multiple times_ - for each configuration. – Oded Jan 23 '12 at 21:46
-
Prob. going to do that. Where does VS store the currently selection Configuration? In the .sln file? Maybe I could extract that? – Colin Jan 23 '12 at 21:48
-
@Colin - Not in the `.sln`. Possibly in the `.suo` file (as this is user specific). – Oded Jan 23 '12 at 21:51
-
Hmm, thought so, but there's suo file.. Will just go with the different calls then... – Colin Jan 23 '12 at 21:53