Teamcity无法通过nuget安装软件包 [英] Teamcity failing to install packages via nuget
问题描述
已解决-请查看评论
我在Team City上有一个项目,未能安装所需的软件包.
I have a project on team city that is failing to install the required packages.
这已经工作了一年多,但本周所有构建都开始失败. 我的开发过程如下:
This has has worked for over a year but this week all builds started failing. my development process is as follows:
我们使用github,并使用Visual Studio在本地进行开发.我们有一个Windows Teamcity代理进行编译,还有一个Teamcity服务器自动运行构建.
We use github and develop locally using visual studio. We have a windows teamcity agent that does our compiling, and a teamcity server that automatically runs builds.
我在构建中遇到此错误:
I get this Error on a build:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(902, 9): error MSB3073: The command "nuget install C:\BuildAgent\work\MyProject\MyLibaries\Gelf4Net\Gelf4net\packages.config -o C:\BuildAgent\work\MyProject\MyLibaries\Gelf4Net\Gelf4net\Packages" exited with code 1.
在我的packages.config中,我需要安装以下软件包:
In my packages.config i have the following packages i need to install:
package id="log4net" version="1.2.11"
package id="Newtonsoft.Json" version="4.5.10"
package id="RabbitMQ.Client" version="2.8.7"
我已经阅读了网上的许多主题,并尝试了以下方法:
I have read through many topics on the net and have tried the following:
- 从teamcity nuget中删除了所有软件包文件夹(强制下载新软件包)
- 将nuget更新为最新版本(2.5)
- 将所有引用添加到项目中并推送
- 将项目添加到teamcity
- 在teamcity上启用和禁用nuget
- 将新的nuget 2.5添加到了teamcity
如果我运行"nuget install C:\BuildAgent\work\MyProject\MyLibaries\Gelf4Net\Gelf4net\packages.config -o C:\BuildAgent\work\MyProject\MyLibaries\Gelf4Net\Gelf4net\Packages" on the build agent it works and installs the packages.
If I run "nuget install C:\BuildAgent\work\MyProject\MyLibaries\Gelf4Net\Gelf4net\packages.config -o C:\BuildAgent\work\MyProject\MyLibaries\Gelf4Net\Gelf4net\Packages" on the build agent it works and installs the packages.
项目在本地构建和运行.
The projects build and run locally.
请提供任何建议或帮助
推荐答案
我发现了这个问题,我们的项目包括许多其他项目,除非每个项目中的软件包使用相同的版本,否则teamcity将无法构建
I have found the issue, our projects incude many other projects and unless the packages in each project are on the same version, teamcity will fail to build
这篇关于Teamcity无法通过nuget安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!