4

Let me start out by saying, I am completely new to TeamCity.

The project I am building was built with VS 2013, so I have my Nuget version set to 2.8.6. I saw in some other posts that this issue normally happens from not running the latest nuget package, but this is the latest compatible package I can use.

The project builds completely fine in Visual studio but the build fails every time in TC at this line. The 30 or 40 packages prior to this install successfully

[Exec] C:\TeamCity\buildAgent\work\52c756fe2f1d3d74\OPIS\.nuget\NuGet.targets(100, 9): 'JSNLog' already has a dependency defined for 'Newtonsoft.Json'.[08:09:38]
[Exec] C:\TeamCity\buildAgent\work\52c756fe2f1d3d74\OPIS\.nuget\NuGet.targets(100, 9): error MSB3073: The command ""C:\TeamCity\buildAgent\work\52c756fe2f1d3d74\OPIS\.nuget\NuGet.exe" install "C:\TeamCity\buildAgent\work\52c756fe2f1d3d74\OPIS\OPIS\packages.config" -source ""  -NonInteractive  -solutionDir "C:\TeamCity\buildAgent\work\52c756fe2f1d3d74\OPIS\ "" exited with code 1.

I have tried reinstalling JSNlog and Newtonsoft.Json in my VS project, cleaning all files within TC and still, removing the project from TC as a whole and redoing the build steps and I get the same error

Steven Ackley
  • 593
  • 7
  • 31

1 Answers1

5

I have solved same problem by upgrading Nuget in TeamCity.

You have to log as system administrator.

Go to panel Administration

Go to Integrations->Nuget-> Tab Nuget.exe Button Fetch Nuget -> choose a version superior than current and set as default

Check in your build configuration if step nuget pack uses new version of nuget, and run!

Mine was 2.8.0, now is 3.4.3

cdiazal
  • 988
  • 11
  • 28