Need a command prompt fast while working in Visual Studio? Yes is the answer, especially with modern web development efforts. Often this is to start a command line interface tool, install an npm package, start a web server etc. This is an old tip but is more relevant today than ever. Alt-C is the answer...read how.
- November 10, 2018
Ok, with today's’ development efforts I am in need of a quick way to open a command prompt to the location of the solution. Here is a quick tip on how to enable a keystroke to immediately open one for you (while working within vs.net). Tools > External Tools “Add”
Use the following values Title: VS Command Prompt
Arguments: /k “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat”
Initial Directory: $(SolutionDir) (You can also use $(ProjectDir) to open command prompt in the location of the current project … i like this better) After you hit OK VS Command Prompt command is available under Tools
Now you can add a Key Stroke command for this… Tools > Options > Keyboard (here i have added Alt-C). Shown below the only thing to remember is this was my 2nd external tool so I had to look for Tools.ExternalCommand2 to attach my keystroke command.
Now I can click Alt-C and immediately a command prompt window opens to the my solution directory.