Developer command prompt shortcuts
The command prompt shortcuts are installed in a version-specific Visual Studio folder in your Start menu. Here's a list of the base command prompt shortcuts and the build architectures they support:
- Developer Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.
- x86 Native Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.
- 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.
- x64_x86 Cross Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 32-bit, x86-native code.
The Start menu folder and shortcut names vary depending on the installed version of Visual Studio. If you set one, they also depend on the installation Nickname. For example, suppose you installed Visual Studio 2019, and you gave it a nickname of Latest. The developer command prompt shortcut is named Developer Command Prompt for VS 2019 (Latest), in a folder named Visual Studio 2019.
To open a developer command prompt window
-
On the desktop, open the Windows Start menu, and then scroll to find and open the folder for your version of Visual Studio, for example, Visual Studio 2019.
-
In the folder, choose the Developer Command Prompt for your version of Visual Studio. This shortcut starts a developer command prompt window that uses the default build architecture of 32-bit, x86-native tools to build 32-bit, x86-native code. If you prefer a non-default build architecture, choose one of the native or cross tools command prompts to specify the host and target architecture.
For an even faster way to open a developer command prompt, enter developer command prompt in the desktop search box. Then choose the result you want.
Developer command file locations
If you prefer to set the build environment in an existing command prompt window, you can use one of the command files created by the installer. We recommend you set the environment in a new command prompt window. We don't recommend you later switch environments in the same command window.
The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2019, the typical installation location on a 64-bit system is in \Program Files (x86)\Microsoft Visual Studio\2019\edition. Edition may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.
The primary developer command prompt command file, VsDevCmd.bat, is located in the Common7\Tools subdirectory. When no parameters are specified, it sets the environment to use the x86-native tools to build 32-bit x86 code.
More command files are available to set up specific build architectures. The command files available depend on the Visual Studio workloads and options you've installed. In Visual Studio 2017 and Visual Studio 2019, you'll find them in the VC\Auxiliary\Build subdirectory.
These command files set default parameters and call VsDevCmd.bat to set up the specified build architecture environment. A typical installation may include these command files:
Command File | Host and Target architectures |
---|---|
vcvars32.bat | Use the 32-bit x86-native tools to build 32-bit x86 code. |
vcvars64.bat | Use the 64-bit x64-native tools to build 64-bit x64 code. |
vcvarsx86_amd64.bat | Use the 32-bit x86-native cross tools to build 64-bit x64 code. |
vcvarsamd64_x86.bat | Use the 64-bit x64-native cross tools to build 32-bit x86 code. |
vcvarsx86_arm.bat | Use the 32-bit x86-native cross tools to build ARM code. |
vcvarsamd64_arm.bat | Use the 64-bit x64-native cross tools to build ARM code. |
vcvarsall.bat | Use parameters to specify the host and target architectures, Windows SDK, and platform choices. For a list of supported options, call by using a /help parameter. |