'System.Net.Http 4.0.0' package requires NuGet client version '3.0' or above
Solution 1
Download NuGet 3.1 from this url:
http://dist.nuget.org/win-x86-commandline/v3.1.0-beta/nuget.exe
Then put that on your build server, put the directory in your path, and run your NuGet build steps as "Command Line" commands in TeamCity, using NuGet.exe.
Solution 2
On your teamcity client you can configure the nuget versions available to your build agents.
Go to Administration -> Integrations -> NuGet
From this screen you can click Fetch NuGet and retrieve the latest version. Then you should be able to specify that version on your build step.
Related videos on Youtube
Michael Esteves
“If you're not making someone else's life better, then you're wasting your time. Your life will become better by making other lives better.” ― Will Smith
Updated on September 16, 2022Comments
-
Michael Esteves over 1 year
Using team city as our CI and I've started getting this error message. We've obviously updated System.Net.Http recently which now needs a new version of NuGet. How do I get team city to find the new NuGet version. I've tried installing VS2015 and updating NuGet package manager through there. I've tried pointing directly to the command line nuget.exe (Don't know if that's been updated to v3?)
[restore] The 'System.Net.Http 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60717.93'. [restore] Process exited with code 1
Do I just have to just wait till MS pushing the new nuget package to nuget?
Thanks
-
Michael Esteves over 8 yearsI have 9.1.1 (build 37059). The nuget package restore command line part is separate to VS2015 from what I can tell? Team city doesn't see v3 only 2.x nuget.org/packages/NuGet.CommandLine
-
Michael Esteves over 8 yearsYou sir are a legend!