In a projects settings, on the Debug tab, is there a way to use to use the project macro variables in the command line arguments box?
I know you can't use them directly because they don't get expanded but is there a clever solution to this?
EDIT: I'm using a C# project.
To set command-line arguments in Visual Studio, right click on the project name, then go to Properties. In the Properties Pane, go to "Debugging", and in this pane is a line for "Command-line arguments." Add the values you would like to use on this line. They will be passed to the program via the argv array.
$(ProjectDir)The directory of the project (defined as drive + path); includes the trailing backslash '\'.
No, this is supported [but not for C# projects].
Silly example I tried: Command Arguments = $(CharacterSet)
. Got "Unicode"
at runtime for argv[1]
inside main()
.
Select "Command Arguments", click on the dropdown arrow, Edit. Click Macros to see what macros are available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With