Visual Studio 安装程序 - 如何恢复丢失的组件

Visual Studio installer - how restore missed components

我正在借助以下工具下载 VS 2019 社区:

vs_community.exe --layout g:\cat\e-install\install\Dev\ide-editors-platforms\VS\vs2019-all-layout_en_US\ --lang en-US

在 doanload 磁盘 g 有几秒钟不可用时,我看到了这样的消息:

Error: Finished with errors. Error: Can't find path "g:\cat\vs2019-all-layout_en_US_16_11\Microsoft.VisualC.14.25.MFC.Redist.X64,version=14.25.28508".

如何重新运行下载、验证丢失的包以及只下载丢失的包?

How can I re-run downloading, verify missed packages, and download only missed packages?

,你可以使用--fix命令来验证和修复(修复丢失的包)。

官方文档:Layout command and command-line parameters提到

--fix => Verify the contents of a layout. If any files are corrupt or missing, they’re redownloaded. Internet access is required to fix a layout.

命令应该是这样的:

vs_community.exe --layout g:\XXXX\XXXX\... --fix