VS2017 无法加载源 https://api.nuget.org/v3/index.json 的服务索引?

编程入门 行业动态 更新时间:2024-10-23 04:56:03
本文介绍了VS2017 无法加载源 api.nuget/v3/index.json 的服务索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我收到此错误:

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

解决方案

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

解决方案

  • 如下所示转到您的 Visual Studio 安装位置 -
  • C:Program Files (x86)Microsoft VisualStudio2017ProfessionalCommon7IDE

  • 以管理员身份打开 devenv.exe.config 文件.
  • 在现有的 system 标签中添加如下 defaultProxy 标签 -

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

  • 重启 VS.
  • I am getting this error:

    [nuget] Unable to load the service index for source api.nuget/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

  • Go to your Visual Studio install location as below -
  • C:Program Files (x86)Microsoft Visual Studio2017ProfessionalCommon7IDE

  • Open devenv.exe.config file as an Administrator.
  • Add defaultProxy tags as below, within the existing system tag -

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

  • Restart VS.
  • 更多推荐

    VS2017 无法加载源 https://api.nuget.org/v3/index.json 的服务索引?

    本文发布于:2023-11-02 14:52:38,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1552690.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:索引   加载   api   https   nuget

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!