The VS command prompt is not a standaloneshell, but the standard cmd.exe
with some EnvironmentVariables setup — through vcvarsall.bat
Charmingly, vcvarsall.bat
only ships with the c++ edition, and resides in the Microsoft Visual Studio 10.0VC
folder.
So if you haven’t installed VS c++ Express — and you want to access the shell, you probably have to install VS c++ Express; that’s what I did, anyway.
- Select
Tools >> External Tools
in Visual Studio.
- Click
Add
- Fill in the Title - I used
Visual Studio Command &Prompt
(C
is already assigned to Customize)
- Command:
cmd.exe
(should already be on your PATH)
- Arguments:
/k "pathoMicrosoft Visual Studio 10.0VCvcvarsall.bat"
- Pick an Initial directory. I used
$(ProjectDir)
- Click
OK
I have these notes @ http://www.xradiograph.com/Programming/VisualStudioExpress which were in turn adapted from http://visualbasic.about.com/b/2010/08/17/the-visual-studio-command-prompt.htm and other sources
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…