Adding VS Developer Command Prompt To Windows Terminal (VS 2019)
In an effort to be using Windows Terminal for everything Powershell/Command related these days it occurred to me that I hadn’t moved my VS2019 Command Prompt to Windows Terminal. This meant having to open VS all the time (as well as make sure that the command was mapped in external tools!) (If you need help on that I cover that partially in the post on Unshelving TFS changes into another branch (VS 2017))
This guide will assume you already have Windows Terminal on your system. If you don’t you can get it from the Windows Store, or on GitHub.
Editing Your Terminal Settings
Open up Windows Terminal, and go to settings (Ctrl + ,)
This is the JSON that controls the Terminal. Find the list
array.
Add a new JSON object to this array, as per below
{
"commandline": "cmd.exe /k \"C://Program Files (x86)//Microsoft Visual Studio//2019//Enterprise//Common7//Tools//VsDevCmd.bat\"",
"cursorColor": "#EEEEEE",
"cursorShape": "bar",
"fontFace": "Consolas",
"fontSize": 10,
"guid": "{5ee0706e-b015-46b2-98a3-2122a8e627d3}",
"historySize": 9001,
"icon": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\Assets\\VisualStudio.70x70.contrast-standard_scale-80.png",
"name": "Developer Command Prompt for VS2019",
"padding": "0, 0, 0, 0",
"snapOnInput": true,
"startingDirectory": "%USERPROFILE%"
}
This will tell Terminal to start cmd.exe and run the VS developer command line tools.
Now go back to Windows Terminal and you should see a new entry in the dropdown list which when selected should launch the VS prompt.
Adding An Icon
I added an Icon object that VS already had on the system so that it will look nicer in the dropdown. You can point it to any image on your system, but for reference the images that VS uses are stored permanently (for VS2019) at:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Assets
One comment