18

When I install "real" editions, the command prompt exists as a tool, but not in the express edition?

How can I open the special command prompt, and have easier access to the various command-line tools that ship with Visual Studio and the .NET framework?

See Also

Community
  • 1
  • 1
Michael Paulukonis
  • 9,020
  • 5
  • 48
  • 68
  • 1
    I don't know if these steps are the same for earlier version of VS Express, or for other editions. Since the only attempted question/answer I saw was for 2008, didn't specify edition, and was incomplete, I started this fresh. – Michael Paulukonis Nov 22 '10 at 12:23

3 Answers3

28

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.0\VC 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.

  1. Select Tools >> External Tools in Visual Studio.
  2. Click Add
  3. Fill in the Title - I used Visual Studio Command &Prompt (C is already assigned to Customize)
  4. Command: cmd.exe (should already be on your PATH)
  5. Arguments: /k "\path\to\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
  6. Pick an Initial directory. I used $(ProjectDir)
  7. Click OK

alt text

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

Michael Paulukonis
  • 9,020
  • 5
  • 48
  • 68
  • 1
    Step 5 should actually have one double quote before the path, and the other after the path. (This is so spaces in the path will be accepted.) It should read: 5.Arguments: /k "<\path\to\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" – leanne Jan 21 '13 at 20:44
  • Yes but you should remove the <. My guess it should be <\path\to> or something like that. If you just put the complete path in double quotes like you see it in your explorer, it will be fine. However, the command prompt is still missing PATH variables (I'm using VS2012 Express for WP8) – Markus Rudel Jan 22 '13 at 12:34
  • @MarkusRudel - what PATH variables are missing? – Michael Paulukonis Jan 22 '13 at 13:49
  • I guess it was missing a lot of the variables :/ I'm using VS2012 Pro now and the command prompt is just working there. Stupid limitations of the express version... – Markus Rudel Jan 24 '13 at 09:53
4

04 December 2010

You can download Windows SDK 7.1 Net (Framework) 4 for free. For XP, Vista,... Windows SDK 7.1 contains Command Prompt and that work perfect. I have tried with Visual Basic 2010 Express to create Client Windows Communication and it's perfect. See you soon.

Xanadu
  • 41
  • 1
3

Just install VC++ express edition. It will automatically install visual studio command prompt. you must have only installed vc# express not vc++ express. Try installing it and you will get command prompt, as it is for visual basic 2005 edition.