从命令行安装Windows调试工具



我正在尝试在AWS Codebuild中自动化Windows构建,这需要下载安装了Debugging Tools for Windows的Windows SDK。

我可以使用Visual Studio安装Windows SDK以及所需的其他一些文件。

powershell -c "Start-Process -FilePath 'vs_community.exe' -ArgumentList "--quiet", 
"--norestart" , "--add Microsoft.VisualStudio.Workload.Universal", 
"--add Microsoft.VisualStudio.Workload.NativeDesktop", 
"--add Microsoft.VisualStudio.Component.VC.ATLMFC", 
"--add Microsoft.VisualStudio.Component.Windows10SDK.19041", 
"--includeRecommended" -Wait;"

该构建需要在Windows SDK中启用Debugging Tools for Windows,这在UI安装中很简单。但由于我想自动化这一点,我正在寻找一个在Windows10SDK中安装Debugging Tools for Windows的命令行选项。

我能够通过以下命令行通过独立的Windows sdk安装程序安装调试工具:

powershell -c "Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/?linkid=2120843' -OutFile winsdksetup.exe -UseBasicParsing ;"
winsdksetup.exe /features + /q /norestart

/features +选择要安装的Windows SDK中的所有可用功能。