How do I add the Visual Studio Developer's Command Prompt to the list of Windows Terminal consoles?
Asked
Active
Viewed 7,410 times
4 Answers
41
Select Settings, which will open a JSON file.
Paste the following to the array of profiles in the JSON, changing 2019 to 2017 and Professional to Community to match your install.
,
{
"guid" : "{1748ecca-abdd-4aa4-bcc4-9fca0d045be5}",
"name" : "VS cmd",
"commandline" : "cmd.exe /k \"%PROGRAMFILES(X86)%\\Microsoft Visual Studio\\2019\\Professional\\Common7\\Tools\\VsDevCmd.bat\"",
"icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
"hidden": false
}

Wallace Kelly
- 15,565
- 8
- 50
- 71
-
9For Community version users, the command line is: "cmd.exe /k \"%PROGRAMFILES(X86)%\\Microsoft Visual Studio\\2019\\Community\\Common7\\Tools\\LaunchDevCmd.bat\"" – Costin Mar 11 '20 at 09:43
-
Yeah, and mine was a little different as well - I split app installations across several drives so I can't use the %environment variable% thing and hard code it: D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat – Jester Jun 08 '20 at 21:34
-
And for VS2019 community x64 version, the command line is: "cmd.exe /k \"%PROGRAMFILES(X86)%\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\"" – Sam Jun 23 '20 at 13:10
-
3For enterprise version, use `"cmd.exe /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\vsdevcmd.bat\""` – user3613932 Jul 07 '20 at 23:41
8
The answer from Wallace Kelly is great, but the settings below may be a useful copy/paste for others who want Visual Studio icons, both x86 and x64 and a less DOS-like font.
As with Wallace's answer, adjust "2019" and "Professional", e.g. for 2017/Community, as needed.
{
"guid": "{9a3a9308-d6f8-4b1d-896c-a27c59c28be3}",
"name": "VS2019 x86",
"commandline": "cmd.exe /k cd c:/dev/mc-hardware-svc/out/vs-x86-Debug && \"C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Auxiliary/Build/vcvars32.bat\"",
"fontFace": "Consolas",
"fontSize": 10,
"icon" : "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/Assets/VisualStudio.70x70.contrast-black_scale-80.png",
"hidden": false
},
{
"guid": "{ceec68f2-0ef7-48f0-84db-4693612532cd}",
"name": "VS2019 x64",
"commandline": "cmd.exe /k \"C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Auxiliary/Build/vcvars64.bat\"",
"icon" : "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/IDE/Assets/VisualStudio.70x70.contrast-black_scale-80.png",
"hidden": false
},

Andrew E
- 7,697
- 3
- 42
- 38
6
For VS 2022 Community:
{
"name": "Developer PowerShell for VS 2022",
"commandline": "powershell.exe -noe -c \"&{$vsPath = &(Join-Path ${env:ProgramFiles(x86)} '\\Microsoft Visual Studio\\Installer\\vswhere.exe') -property installationpath; Import-Module (Join-Path $vsPath 'Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll'); Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation}\"",
"icon": "%ProgramFiles%\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\Assets\\VisualStudio.70x70.contrast-standard_scale-180.png"
},
{
"name": "Developer Command Prompt for VS 2022",
"commandline": "%comspec% /k \"%ProgramFiles%\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\VsDevCmd.bat\"",
"icon": "%ProgramFiles%\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\Assets\\VisualStudio.70x70.contrast-standard_scale-180.png"
}

vocasle
- 799
- 8
- 11
4
VisualStudio developer prompts are now in Windows Terminal stable (1.12)! https://twitter.com/mrhestew/status/1489322750330085380
winget upgrade -e Microsoft.WindowsTerminal

Rick Neeft
- 105
- 1
- 10