我正在尝试将我们的TFS2015 Build(TFSBuild vnext)与VS Team Services一起使用.
到目前为止,大多数博客和文档都很有用,除了在尝试构建使用自定义包源来进行NuGet自动包恢复的项目时.
我已经成功部署了一个Team Services Build Agent(新的构建机制),并且在恢复NuGet包的构建任务失败之前似乎一切顺利.
失败的原因是未从已安装的VS配置中获取自定义/私有包源,因此无法找到这些包.默认NuGet包Feed中的传统包确实可以正常恢复.
如何在使用代理时指定NuGet使用的其他包源?
编辑:vcastro询问了NuGet Installer构建步骤,并在该构建步骤的配置中定义了路径.以上是使用Visual Studio Build步骤和集成选项来使NuGet恢复包.参考此图片以供参考:
我在2015年TFS Build期间遇到了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 …Run Code Online (Sandbox Code Playgroud)