Teamcity failing to install packages via nuget

我的梦境 提交于 2020-01-03 18:37:11

问题


SOLVED - PLEASE SEE COMMENT

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:

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.

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:

  • removed all package folder from teamcity nuget (force new packages to be downloaded)
  • updated nuget to latest version (2.5)
  • re added all the references to the project and pushed
  • re added the project to teamcity
  • enabled and disabled nuget on teamcity
  • added the new nuget 2.5 to teamcity

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.

Please any suggestions or help is appreciated


回答1:


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



来源:https://stackoverflow.com/questions/16835966/teamcity-failing-to-install-packages-via-nuget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!