2017-01-26 33 views
1

我有以下nuget.config文件和波纹管文件内容VSO建设不能下载

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <config> 
     <add key="repositoryPath" value="Packages" /> 
    </config> 
    <packageRestore> 
     <add key="enabled" value="True" /> 
    </packageRestore> 
    <packageSources> 
     <!-- Ditch all the Global NuGet package sources we only want a 
     single private NuGet repo for this project --> 
     <clear /> 
     <add key="private="private" /> 
     <add key="nuget.org" value="https://www.nuget.org/api/v2/" /> 
    </packageSources> 
    <disabledPackageSources> 
     <add key="nuget.org" value="false" /> 
    </disabledPackageSources> 
</configuration> 

所有存在于私人饲料包恢复软件包,但同样没有与发生那些在nuget.org:

从VSO建立输出

饲料中使用:

C:\用户\ buildguest \应用程序数据\本地\的NuGet \缓存

私人

https://www.nuget.org/api/v2/

...

恢复NuGet包AutoMapper.5.2.0。

警告:无法找到包'AutoMapper'的版本'5.2.0'。

这发生在VSO的NuGet恢复步骤中。

回答

1

使用NuGet.Protocol.Core.v 饲料与

<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> 

,而不是

<add key="nuget.org" value="https://nuget.org/api/v2/" /> 
+0

会尝试一下,谢谢协议 – Marco