Visual Studio Command Prompt

Updated: August 2010

The Visual Studio Command Prompt and the SDK Command Prompt automatically set the environment variables that enable you to easily use .NET Framework tools.

In the .NET Framework version 4 and later, you should use the Visual Studio Command Prompt, which is available from the Visual Studio Tools folder (on the taskbar, click Start, click All Programs, click Visual Studio, and then click Visual Studio Tools). Starting with the Visual Studio 2010, the 64-bit versions of Visual Studio provide two command prompts: the Visual Studio Command Prompt for 32-bit tools, and the Visual Studio x64 Win64 Command Prompt for 64-bit tools. 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. Check the documentation for the individual tools to determine whether you should run both versions of the tool.

In the versions of the .NET Framework before version 4, you can use either the Visual Studio Command Prompt or the SDK Command Prompt to run the tools. The SDK Command Prompt is included in the .NET Framework version 2.0 Software Development Kit (SDK). (The .NET Framework versions 3.0 and 3.5 are built on the .NET Framework version 2.0. Consequently, the SDK Command Prompt from the .NET Framework 2.0 SDK is the latest stand-alone SDK Command Prompt available.)

NoteNote

If you are using the SDK Command Prompt, the required environment variable values are provided by the sdkvars.bat batch file, which is located in the SDK\v2.0\bin folder. The SDK Command Prompt calls this batch file, but the variables expire when you close the command prompt. To make the settings permanent, you can add the variable values to your system variables by using the Environment Variables dialog box, which you can access from the Advanced tab of System Properties.

If you use the Windows Command Prompt, you must navigate to the Program Files directory that contains the tools; for example: cd %ProgramFiles%\Microsoft SDKs\Windows\v6.1\Bin.

To open the Command Prompt window

If you are using the .NET Framework 4 or later:

  • Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt.

If you are using earlier versions of the .NET Framework:

  • Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt. (The Visual Studio Command Prompt is provided with Visual Studio 2005 and later versions.)

    -or-

  • Click Start, point to All Programs, point to Microsoft .NET Framework SDK v2.0, and then click SDK Command Prompt. (This option is available only when you install the .NET Framework 2.0 SDK.)

See Also

Other Resources

.NET Framework Tools

Change History

Date

History

Reason

August 2010

Added information about running tools from 64-bit versions of Visual Studio.

Information enhancement.