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

自作多情 提交于 2020-01-03 07:24:51

问题


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


回答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.




回答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.




回答3:


I think you need TeamCity 9.1, as that version contains the VS2015 build tools: https://confluence.jetbrains.com/display/TCD9/What%27s+New+in+TeamCity+9.1

NuGet 3.0 was released with VS2015: http://docs.nuget.org/release-notes/nuget-3.0.0

In earlier versions of Visual Studio you could add a System reference to System.Net.Http, but Microsoft has now moved that into a NuGet package.



来源:https://stackoverflow.com/questions/32279970/system-net-http-4-0-0-package-requires-nuget-client-version-3-0-or-above

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!