1.在解决方案根目录下面创建.nuget文件夹。
2.添加NuGet.Config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="xxx" value="你的nuget存放的服务器地址" protocolVersion="你的协议版本" />
</packageSources>
<disabledPackageSources>
<add key="nuget.org" value="true" />
</disabledPackageSources>
</configuration>
protocolVersion协议的版本很重要,如果与你发布的版本不一致,就会令你的项目还原不了nuget包
网友评论