在 TFS Build 2015 期间,我在还原 NuGet 包时遇到问题。
由于某些软件包需要 NuGet 3.x 客户端,因此我已将新的可编写脚本的构建配置为使用自定义 NuGet 位置,在该位置我放置了NuGet Command-Line 3.x beta的可执行文件。
每当我运行构建时,所有包都无法恢复,并且 NuGet 抛出“无法找到版本...”错误:
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 在构建机器中构建相同的解决方案时,所有包都已成功还原。
我该如何解决这个问题?