Visual Studio 2019 社区版离线安装程序

Visual Studio 2019 Community Edition Offline Installer

我已经使用以下命令行下载了所有 VS 包(大约 35 GB)。 vs_community.exe --layout c:\vslayout --lang en-US

现在,我使用命令 vs_community.exe --noweb 在没有互联网连接的 PC 上安装。由于安装程序选项是离线模式,但安装程序仍然说未连接到互联网。

为了帮助改善问题,我在这里添加一个答案。另外,感谢 Martheen 分享信息。

回答

由于新环境处于离线状态,无法获取安装VS的请求和权限,安装VS需要安装离线包的证书

所以你得打开离线包的certificates文件夹,一一安装得到。

你可以refer to this for more info.

更新 1

使用bat文件执行VS离线安装

certmgr.exe -add [layout path]\certificates\manifestRootCertificate.cer -n "Microsoft Root Certificate Authority 2011" -s -r LocalMachine root

.....

//add any for certs


vs_community.exe --noweb