VS2017离线安装记录

制作离线安装包的方法:

1.找一台能上网的电脑,下载在线原版安装器: vs_community.exe

微软不提供下载了,我上传1份到CSDN: 点我进入下载

2.在命令行输入命令:(注意不能换行,我这里换行是为了好看)

vs_community.exe 
--layout C:\vs2017 
--lang zh-CN 
--add Microsoft.VisualStudio.Workload.NativeDesktop
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64
--add Microsoft.VisualStudio.Component.VC.ATLMFC
--add Microsoft.VisualStudio.Component.Windows10SDK.10240
# --add Microsoft.VisualStudio.Component.Windows10SDK.17763(默认SDK版本)
# --add Microsoft.VisualStudio.Component.VC.140(旧版本工具集,支持WinXP)

我这里只添加VC++所必需的组件,根据个人需求选择要下载的组件。 组件的名字可以在下面链接找到: Visual Studio Community workload and component IDs | Microsoft Learn

3.等待下载完成, 将C:\vs2017文件夹打包,这就是离线安装包了。


离线安装

将刚才的压缩包解压。 运行命令:

vs_community.exe --noweb

弹出安装界面,选择组件的时候注意不要选择刚才没下载的组件,否则会安装失败。


我下载好的离线包: 链接: https://pan.baidu.com/s/1bkLRX0vyMuJKt-hPnEpsUg 提取码: mb4r