How to determine the relative path for "Start an external program" in the VS 2010 project?

I know there is a similar question here , but I would like, if possible, to determine the relative path for the 'Start External Program' or any workaround that does not limit me to adding a new empty project to the project.

I use VB.NET in Visual Studio 2010, developing WinForms applications.

+6
debugging visual-studio-2010 winforms
source share
3 answers

While you cannot use project macros such as $(SolutionDir) or environment variables for β€œRun external program:”, you can use relative paths if the path relative to the solution directory solves your problem. I just tested VS2010 and the VB.NET WinForms project and installed "Run external program:" on:

  • ..\..\..\windows\system32\cmd.exe

and then Ctrl+F5 launches the command line. Set the number of elements .. to the depth of your project folder.

+3
source share

You can use project macros like $ (ProjectDir) and define from there.

See this page

+2
source share

I do not know if this is possible. Perhaps the use of environement variables is like% CD%, but I'm not sure.

But these settings are saved in csproj.user (or probably vbproj.user in your case), so each developer can easily customize their settings :).

+1
source share

All Articles