0
votes

I am building with TFS 2017. I am currently receiving this in my log:

[error]Core\Install\CSharp.nuget\NuGet.targets(87,9): Error : Unable to find version '9.0.1' of package 'Newtonsoft.Json'.

as well as some other packages. Immediately following, I have this:

[error]Core\Install\CSharp.nuget\NuGet.targets(87,9): Error MSB3073: The command ""E:\agent01\31\s\Core\Install\CSharp.nuget\nuget.exe" install "E:\agent01\31\s\Core\Source\Core.PackageReference\packages.config" -source "" -RequireConsent -solutionDir "E:\agent01\31\s\Core\Install\CSharp\ "" exited with code 1.

I am only switching builds from 2013 to 2017 and know that they should work without going inside of config files and changing anything. The only changes I should have to worry about are with the build machine or in the tasks I've created for this build. I was wondering what potential solutions someone may have.

I have a nuget restore task and all of the correct solutions are being built. Looking in to my nuget restore task, I see near the bottom:

Adding package 'Newtonsoft.Json.9.0.1' to folder 'E:\agent02\12\s\Core\Source\packages'

1
Do you have multiple build agents? If you run your project manually on your build agent machine, is it working?Cece Dong - MSFT
Yes there are multiple build agents, two to be exact. I can run these builds on Team Build, tfs (2013), and they work properly so there should be nothing wrong with any code. The build does not run properly in 2017. It does seem to get the sources properly but does not build them without the errors stated above. I would guess that the problem is with the build server since we are using a new server to host the new builds and plenty of other things have had to be added to it already but not sure what would be needed on there.SomewhatStudent
How's your build definition like? How did you set Nuget package in your project? If you run your project manually on your build agent machine, is it working?Cece Dong - MSFT
Yes, if it is built manually, it works fine on the build server. I have nuget version 3.3.0, path to solution is **\.sln, no nuget arguments, disable local cache. The nuget task also comes before any building occurs and immediately after it gets sourcesSomewhatStudent
Are you able to share the entire log?Cece Dong - MSFT

1 Answers

0
votes

The issue I found was with the build task. I had sent it to an output directory and that had caused the error.