TeamCity already has a dependency defined for

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

The project I'm building was built on VS 2013, so I have a version of Nuget installed in 2.8.6. I saw in some other posts that this problem usually occurs due to the absence of the last nuget package, but this is the last compatible package that I can use.

The project works perfectly fine in Visual Studio, but the build fails every time in TC on this line. 30 or 40 packages before this installation 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 tried reinstalling JSNlog and Newtonsoft.Json in my VS project, clearing all the files in TC and still deleting the project from TC as a whole and redoing the build steps, and I get the same error

+4
source share
1 answer

I solved the same problem by updating Nuget in TeamCity.

You need to log in as a system administrator.

Go to the Administration panel

Go to Integrations-> Nuget-> Tab Nuget.exe Fetch Nuget button -> select a version that is superior to the current one and set the default

Check your build configuration if the nuget steps package uses the new version of nuget and starts!

Mine was 2.8.0, now 3.4.3

+4
source

Source: https://habr.com/ru/post/1630069/


All Articles