如何将 Visual Studio 开发人员的命令提示符添加到 Windows 终端控制台列表中?
问问题
5915 次
4 回答
39
选择设置,这将打开一个 JSON 文件。
将以下内容粘贴到 JSON 中的配置文件数组中,将 2019更改为2017并将Professional更改为Community以匹配您的安装。
,
{
"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
}
于 2019-09-13T14:21:03.090 回答
6
Wallace Kelly 的回答很好,但对于其他想要 Visual Studio 图标(x86 和 x64 以及不太像 DOS 的字体)的人来说,下面的设置可能是一个有用的复制/粘贴。
与华莱士的回答一样,根据需要调整“2019”和“专业”,例如 2017/社区。
{
"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
},
于 2020-10-19T03:53:46.730 回答
3
对于 VS 2022 社区:
{
"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"
}
于 2021-12-12T08:43:32.797 回答
2
VisualStudio 开发人员提示现在在 Windows 终端稳定版 (1.12) 中!https://twitter.com/mrhestew/status/1489322750330085380
winget upgrade -e Microsoft.WindowsTerminal
于 2022-02-04T12:34:37.767 回答