无法连接到nuget包源

时间:2016-07-30 17:08:29

标签: visual-studio-2013 visual-studio-2015 nuget

我的计算机上有2个版本的Visual Studio(2013和2015),因为我安装了VS2013,所以它无法连接到任何nuget.org包源。

  1. 我没有通过代理连接到互联网。

  2. 我尝试清理nuget缓存并在两个版本的visual studio中重新安装nuget包管理器。

  3. C:\用户{用户} \应用程序数据\漫游\的NuGet \ nuget.Config

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <activePackageSource>
           <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
        </activePackageSource>
        <packageSources>
            <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
      </packageSources>
    </configuration>
    

    当我尝试恢复或安装任何软件包时,VS会继续加载,几分钟后消息为:

    使用VS2015:

      

    [nuget.org]无法加载源https://api.nuget.org/v3/index.json的服务索引。   错误al en enviar la solicitud。   没有可靠的conectar con el servidor remoto。

         

    Se produjo un error durante el intentodeconexiónyaque la parte conctadanoreponsdióadecuadamentetras un periodo de tiempo,o bien se produjo un error enlaconexiónestablecidaya que el host conectado no ha podido responder 10.115.8.100:8080

    使用VS2013:

      

    无法连接到远程服务器

1 个答案:

答案 0 :(得分:0)

请检查它是否在VS IDE中有nuget.org软件包源代码,如果没有,可以将其添加回去。

参考:

VS2015 nuget package manager not finding packages

enter image description here

还请确保使用最新的更新和NuGet版本:

enter image description here