Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'System.Net.Http 4.0.0' package requires NuGet client version '3.0' or above

Tags:

nuget

teamcity

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

like image 706
Michael Esteves Avatar asked Aug 28 '15 21:08

Michael Esteves


People also ask

How do I update NuGet to latest version?

Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.

What is NuGet client?

NuGet was initially distributed as a Visual Studio extension. Starting with Visual Studio 2012, both Visual Studio and Visual Studio for Mac can natively consume NuGet packages. NuGet's client, nuget.exe is a free and open-source, command-line app that can both create and consume packages.

How do I manually download NuGet?

Using manual download to acquire a package To download manually, click on Download the raw nupkg file. A copy of the package is copied to the download folder for your browser with the name <name>. <version>. nupkg .


2 Answers

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.

like image 70
null value Avatar answered Oct 11 '22 10:10

null value


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.

like image 41
BeeTee2 Avatar answered Oct 11 '22 09:10

BeeTee2