Visual Studio 2017 无法脱机安装并显示“无法下载安装文件"; [英] Visual Studio 2017 fails to install offline with "Unable to download installation files"

查看:30
本文介绍了Visual Studio 2017 无法脱机安装并显示“无法下载安装文件";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我使用以下命令在我的笔记本电脑上创建了一个离线安装的 VS 2017 社区:

So I've created an offline installed of VS 2017 Community on my laptop using this command:

vs_community.exe --layout "D:DownloadsVS Community 2017" --lang en-US --add Microsoft.VisualStudio.Component.CoreEditor Component.WebSocket Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Component.TypeScript.2.0

vs_community.exe --layout "D:DownloadsVS Community 2017" --lang en-US --add Microsoft.VisualStudio.Component.CoreEditor Component.WebSocket Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Component.TypeScript.2.0

当我将安装文件传输到我的公司 PC(位于防火墙后面)并运行vs_community.exe"安装文件时,我得到的只是这个错误.没有办法绕过公司防火墙或例外.如何离线安装 VS 2017?我在这里遗漏了什么吗?

When I transfer the setup files onto my corporate PC (which is behind a firewall) and run the "vs_community.exe" setup file, all I get is this error. There's no way to bypass the corporate firewall or to make exceptions. How do I install VS 2017 offline? Am I missing something here?

我在笔记本电脑上安装了 VS 2017,保持互联网连接处于活动状态.然后,当我断开笔记本电脑上的互联网并尝试再次安装时,安装程​​序就会启动!因此,也许我的公司 PC 上缺少一些现在安装在我的笔记本电脑上的依赖项?

I have installed VS 2017 on my laptop keeping the internet connection active. Then when I disconnect the internet on my laptop and try installing again, the installer launches! So perhaps there are some dependencies missing on my corporate PC that are now installed on my laptop?

上述命令安装 .NET、.NET core、Xamarin、Node.js、TypeScript 和 C++ for Mobile.总下载大小为 13.2 GB.

The above command installs .NET, .NET core, Xamarin, Node.js, TypeScript and C++ for Mobile. The total downloaded size is 13.2 GB.

推荐答案

成功了!!我所要做的就是将证书安装到根 CA 中!我错过了在 VS 2017 文档中注意到的内容:

It worked!! All I had to do was install the certificates into the root CA! Something I missed noticing in the VS 2017 docs:

如何从离线安装文件夹安装

How to install from the offline installation folder

  1. 安装证书(它们位于您的 Layout 文件夹中的证书"文件夹中.)

  1. Install the certificates (They are in the "certificates" folder, which is in your Layout folder. )

只需右键单击每一个并选择安装 PFX.

Simply right-click each one and choose Install PFX.

--- 微软文档

记得在 PC 上使用 Admin 帐户安装证书,否则将无法工作...

Remember to install the certs using the Admin account on the PC, or it won't work...

这篇关于Visual Studio 2017 无法脱机安装并显示“无法下载安装文件";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆