我在TFS Build 2015中遇到了NuGet包还原方面的问题。
由于某些包要求使用 NuGet 3.x 客户端,因此我已经配置了新的可脚本化构建,以使用自定义 NuGet 位置,其中我放置了 NuGet Command-Line 3.x beta 的可执行文件。
每当我运行构建时,所有的包都无法还原,NuGet 抛出了 "Unable to find version..." 错误:
Unable to find version '1.1.10' of package 'Microsoft.Bcl'.
Unable to find version '4.0.10' of package 'System.Threading'.
Unable to find version '1.1.37' of package 'System.Collections.Immutable'.
Unable to find version '1.0.0' of package 'Owin'.
Unable to find version '4.1.0' of package 'NLog'.
Unable to find version '7.0.1' of package 'Newtonsoft.Json'.
Unable to find version '2.0.1' of package 'MongoDB.Driver.Core'.
Unable to find version '2.0.1' of package 'MongoDB.Driver'.
Unable to find version '2.0.1' of package 'MongoDB.Bson'.
Unable to find version '3.0.1' of package 'Microsoft.Owin.Security.OAuth'.
......还有更多的包。我相信问题很清楚。
当我使用Visual Studio在构建机器上构建相同的解决方案时,所有包都成功恢复了。
我该如何解决这个问题?