参考:
https://blog.csdn.net/weixin_41411130/article/details/82414022
https://blog.csdn.net/fromfire2/article/details/81104648
以VS Enterprise为例:
vs_community.exe --layout e:\vs2019community --add Microsoft.VisualStudio.Workload.CoreEditor --all --add Microsoft.VisualStudio.Workload.NativeDesktop --all -add Microsoft.VisualStudio.Workload.Universal --all
--all 选项的目的是当前Add项目内所有的子项目
如选择--includeRecommended表示选择当前Add项目内推荐的子项目。具体可参考以上microsoft文档。
针对C++开发,我自己的选择:
vs_community.exe --layout e:\vs2019Layout --add --add Microsoft.VisualStudio.Workload.CoreEditor --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended -add Microsoft.VisualStudio.Workload.Universal --includeRecommended
如果用中文,增加选项:--lang zh-CN