无法连接到nuget包源

问题描述 投票:2回答:1

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

  1. 我没有通过代理连接到互联网。
  2. 我试图清理nuget缓存并在两个版本的visual studio中重新安装nuget包管理器。

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的服务索引。发送请求时出错。无法连接到远程服务器。

连接尝试期间发生错误,因为连接方在一段时间后没有正确响应,或者由于连接的主机无法响应而建立的连接发生错误10.115.8.100:8080

使用VS2013:

无法连接到远程服务器

visual-studio-2013 visual-studio-2015 nuget
1个回答
0
投票

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

参考:

VS2015 nuget package manager not finding packages

enter image description here

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

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.