Nuget镜像国内加速

1)NuGet镜像源地址:https://nuget.cnblogs.com/v3/index.json
2)在NuGet.Config中添加这个镜像源:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.cnblogs.com" value="https://nuget.cnblogs.com/v3/index.json" protocolVersion="3" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <packageRestore>
    <add key="enabled" value="True" />
    <add key="automatic" value="True" />
  </packageRestore>
  <bindingRedirects>
    <add key="skip" value="False" />
  </bindingRedirects>
</configuration>

注:NuGet.Config 在 Windows 中路径是 %appdata%\NuGet\NuGet.Config ,在 Mac 与 Linux 中的路径是 ~/.nuget/NuGet/NuGet.Config ,如果没有 NuGet.Config 文件,可以运行 dotnet restore 命令生成。

或者在Visual Studio中的添加方法:


图片.png

由于目前带宽有限,如果出现下面的问题,说明当前带宽跑满了,您可以稍后再试。

The download of 'https://nuget.cnblogs.com/v3-flatcontainer/system.runtime.extensions/4.3.0
/system.runtime.extensions.4.3.0.nupkg' timed out because no data was received for 60000ms.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容