Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between various command shells in VS2010?

What's the difference between "visual studio x64 win64 command prompt", "visual studio x64 cross tools command prompt", and "visual studio command prompt" appearing in the Visual Studio 2010 menu in the Start button?

For the most useful answer, let us be clear about my ignorance level: I'm closer to noob than guru at anything Microsoft or IDEs in general. Long time expert at Linux, editing source in a plain text editor, handmade Makefiles, etc.

I'm sure the differences are simple, perhaps "obvious" to anyone with modest experience at VS2010.

like image 446
DarenW Avatar asked Jul 27 '12 21:07

DarenW


People also ask

What is x64 native tools command prompt?

x64 Native Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 64-bit, x64-native code. x86_x64 Cross Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 64-bit, x64-native code.

What is developer command prompt?

Developer Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code. 2. x86 Native Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code. These two options have different names, but the same annotations.

How do I know if I have vs2010 SP1 installed?

Answer: Run VS 2010, open Help » About. Look for "SP1Rel" after the version number.

What is the command window in Visual Studio?

The Command window is used to execute commands or aliases directly in the Visual Studio integrated development environment (IDE). You can execute both menu commands and commands that do not appear on any menu. To display the Command window, choose Other Windows from the View menu, and select Command Window.


2 Answers

The different batch files adjust PATH, LIB, INCLUDE and LIBPATH so that you can run cl.exe and other build tools easily.

like image 193
IronMensan Avatar answered Nov 15 '22 06:11

IronMensan


This answer focuses mostly on VS2013. Microsoft's documentation http://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx states:

Starting with Visual Studio 2010, you may see multiple command prompts, depending on the version of Visual Studio and any additional SDKs you've installed. For example, 64-bit versions of Visual Studio provide both 32-bit and 64-bit command prompts. (The 32-bit and 64-bit versions of most tools are identical; however, a few tools make changes specific to 32-bit and 64-bit environments.)

It adds, rather unhelpfully:

Check the documentation for the individual tools to determine which version of the command prompt you should use.

The page http://msdn.microsoft.com/en-us/library/jj153218.aspx lists five such command prompts:

  • Developer Command Prompt for VS2013
  • VS2013 ARM Cross Tools Command Prompt
  • VS2013 x64 Cross Tools Command Prompt
  • VS2013 x64 Native Tools Command Prompt
  • VS2013 x86 Native Tools Command Prompt

On my machine, only the 1st, 3rd, and 5th of these are present, and they launch, respectively:

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"" %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86_amd64 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86

To check the environment variables, running the set command for first and "x86 Native" shells gives identical results on my machine. And mmohamad's answer tp Difference between VsDevCmd.bat & vcvarsall.bat in VS2012 agrees with this.

But "x64 Cross" is different: the difference is (excluding Path and LIBPATH for brevity):

 + CommandPromptType=Cross
 + FrameworkDIR64=C:\WINDOWS\Microsoft.NET\Framework64
 + FrameworkVersion64=v4.0.30319
 + Platform=x64
 - LIB=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;
 + LIB=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;
like image 32
Joseph Quinsey Avatar answered Nov 15 '22 07:11

Joseph Quinsey