3

In Visual Studio Debug part, we can pass arguments.

I want to know how to pass the solution folder as an argument, but without putting the directory hardcoded. I will use the project in different locations and I don't want to change those arguments all the time.

Cœur
  • 37,241
  • 25
  • 195
  • 267
aF.
  • 64,980
  • 43
  • 135
  • 198

1 Answers1

0

In visual studio, open project settings (Alt + F7), then goto configuration properties/debugging. In the command arguments combo box select 'edit', a dialog box will popup. Click on Macros button and select SolutionDir as the argument.

Naveen
  • 74,600
  • 47
  • 176
  • 233
  • 2
    that doesn't happear in VS2005, how can I do it here? – aF. Mar 31 '10 at 13:12
  • The shortcut "alt+F7" does not work in VS2010. There it will only display and cycle through a list of active tool windows to choose from. The described property "Configuration Properties -> Debugging -> Command Arguments" only exists for C++ projects. C# projects have a different property mask, which "Debug -> Command line arguments:" **text** box offers neither "edit" nor "macros". It does not translate typed in macros either. – No answer Dec 05 '13 at 12:38
  • This thread describes a workaround for C# project: http://stackoverflow.com/questions/4046575/vs2010-project-macro-variables-in-start-options-command-line-arguments?rq=1 – No answer Dec 05 '13 at 17:14