Passing $(Configuration) as parameter to External Tool in VS2010
Asked Answered
B

1

7

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

Braswell answered 23/1, 2012 at 21:18 Comment(2)
How exactly have you tried to pass it to the batch file?Discontent
In the add external tool window there is a parameters textbox, I just entered it in there.Braswell
D
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.

Discontent answered 23/1, 2012 at 21:27 Comment(4)
@Braswell - 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.Discontent
Prob. going to do that. Where does VS store the currently selection Configuration? In the .sln file? Maybe I could extract that?Braswell
@Braswell - Not in the .sln. Possibly in the .suo file (as this is user specific).Discontent
Hmm, thought so, but there's suo file.. Will just go with the different calls then...Braswell

© 2022 - 2024 — McMap. All rights reserved.