VS2017 无法加载源 https://api.nuget.org/v3/index.json 的服务索引? [英] Unable to load the service index for source https://api.nuget.org/v3/index.json in VS2017?

查看:35
本文介绍了VS2017 无法加载源 https://api.nuget.org/v3/index.json 的服务索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

<块引用>

[nuget.org] 无法加载源的服务索引https://api.nuget.org/v3/index.json.发送时出错请求.无法连接到远程服务器 A 连接尝试失败,因为连接方没有正确响应一段时间后,或建立连接失败,因为已连接主机未能响应 185.82.212.95:8080

解决方案

我在 VS 2017 中遇到了同样的问题.您需要为 VS 启用代理设置,以便它可以使用现有的 IE 代理访问 Internet.这对于那些使用办公室笔记本电脑和代理设置由组策略管理且 IE 设置自动更新的用户来说特别有用.如果 VS IDE 本身有一个选项可以像 Eclipse IDE 一样添加代理,那就太好了.

解决方案

  1. 如下所示转到您的 Visual Studio 安装位置 -

<块引用>

C:Program Files (x86)Microsoft VisualStudio2017ProfessionalCommon7IDE

  1. 以管理员身份打开 devenv.exe.config 文件.

在现有的 system.net 标签中添加如下 defaultProxy 标签 -

<system.net><defaultProxy enabled="true" useDefaultCredentials="true"><代理使用systemdefault="true" bypassonlocal="true"/></defaultProxy><设置><启用 ipv6="true"/></设置></system.net>

  1. 重启 VS.

I am getting this error:

[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending the request. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 185.82.212.95:8080

解决方案

I was having same issue in VS 2017. You would need to enable proxy settings for VS, so that it can use existing IE proxy to reach out internet. This is especially useful, for those users, who uses office laptops and proxy settings are managed by group policies and IE settings get updated automatically. It would have been great if there was an option within VS IDE itself to add proxy just like Eclipse IDE has.

Solution

  1. Go to your Visual Studio install location as below -

C:Program Files (x86)Microsoft Visual Studio2017ProfessionalCommon7IDE

  1. Open devenv.exe.config file as an Administrator.

Add defaultProxy tags as below, within the existing system.net tag -

<system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy usesystemdefault="true" bypassonlocal="true" />
    </defaultProxy>
  <settings>
    <ipv6 enabled="true"/>
  </settings>
</system.net>

  1. Restart VS.

这篇关于VS2017 无法加载源 https://api.nuget.org/v3/index.json 的服务索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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