Package requires NuGet client version '2.12'

89,456

Solution 1

I try everything but nothing helps me. Than I change Visual Studio version from 2012 to 2015 everything is working Like a charm now.

Solution 2

Update your NuGet Package Manager extension. Go to Tools->Extensions and Updates and select Updates->Visual Studio Gallery. Update the NuGet Package Manager extension. Then try to install the package after Visual Studio gets restarted.

Solution 3

NuGet 2.12 only supports Visual Studio 2013 and later. If you're on Visual Studio 2012 you're out of luck.

Solution 4

I struggled with this issue in Visual Studio 2010 when I was trying to add NewtonSoft.Json nuget package into my project. When I try to run the latest version of the nuget package from nuget package manager console:

PM> Install-Package Newtonsoft.Json

It results in the same error as mentioned by OP:

package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.

So I thought I would update the NuGet extension in Visual Studio first to latest version. But when I went into Tools -> Extensions and Updates window the Updates tab wasn't showing any update for Nuget extension. So it seems NuGet client version 2.12 isn't available/supported in Visual Studio 2010 at all. I was running out of options now.

So finally, I tried to install a specific lower version (6.0.3) of Newtonsoft.Json package deliberately this way:

PM> Install-Package Newtonsoft.Json {Your Project Name} 6.0.3

This worked successfully. Latest version of this package at the time of writing this post is 10.0.3 instead.

So, it might be the case that newer version of a nuget package is compatible with only latest version of nuget package manager. So sometimes explicitly installing a lower version of the package might help you. Older version of a nuget package will of course be compatible with older nuget extension in Visual Studio if it is not up-to-date.

The only caveat in this solution is that the functionalities present in lower version of the nuget package you target should suffice your current project needs. Good luck!

Note: Although I've elaborated this solution w.r.t. Visual Studio 2010 but you can try this work around for any Visual Studio version for that matter.

Solution 5

I find out the solution for this problem.

Basically you have a .nuget folder at solution level, that folder contains a nuget.exe file that probably is old. A lot of packages might need new version of that file.

  1. Open this link: https://www.nuget.org/downloads
  2. Download latest version of nuget.exe
  3. Replace your .nuget/nuget.exe with this new version.

And try again, I'm confident it will work.

Share:
89,456
Admin
Author by

Admin

Updated on January 07, 2020

Comments

  • Admin
    Admin over 4 years

    I am trying to install 'WindowsAzure.Storage 8.0.1' in visual studio 2012, but getting the error

    package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.

    on running command "Install-Package NuGet.Client"

    Attempting to resolve dependency 'NuGet.Versioning (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.Packaging (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.Common (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.Packaging.Core (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.Packaging.Core.Types (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.Frameworks (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.Repositories (≥ 3.5.0)'.
    Attempting to resolve dependency 'NuGet.RuntimeModel (≥ 3.5.0)'.
    Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.4)'.
    Attempting to resolve dependency 'NuGet.ContentModel (≥ 3.5.0)'.
    'NuGet.Client 3.5.0' already installed.
    

    But still I am getting the error.

    The 'WindowsAzure.Storage 8.0.1' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.

  • NutcaseDeveloper
    NutcaseDeveloper about 7 years
    Some dependent Dlls are not updated which may be causing the issue. If everything is installed and still not working, suggest downloading the VSIX and re-installing. Worked for me but I am on VS 2013. Download Link : nuget.codeplex.com/releases/view/118318
  • Jay
    Jay almost 7 years
    This is not the answer to the question that you originally asked you should not mark it correct just because it is yours
  • smwikipedia
    smwikipedia over 6 years
    Note that the NuGet Update is in the Updates -> Visual Studio Gallery category. (I am using VS2013.)
  • Eon
    Eon over 6 years
    Whilst at home, I code casually only - I only have a VS2012 installation - and I cannot seem to update Nuget Package manager anymore. This is a great answer as it also showed me that I can still install dated packages (For my own needs of course). +1
  • torno
    torno over 6 years
    Doesn`t work in VS 2012 Prof: 405 Method not allowed
  • Mathivanan KP
    Mathivanan KP over 6 years
    @torno That may because of a connectivity issue with your internet/firewall.
  • Nicki
    Nicki about 6 years
    Awesome!! Learned something useful there :)
  • Curtis Herrick
    Curtis Herrick about 6 years
    Just what I needed. Thanks!
  • Pinski
    Pinski over 5 years
    OMG Thank you so much! This is exactly what I needed. I was looking up all of this complicated stuff about editing build scripts. I should have realized I just needed to update the EXE in the project. Thanks!
  • Khurram Ishaque
    Khurram Ishaque about 5 years
    I think he has resolved the issue by right way. NuGet 2.12 require VS 2013 or more. So, he UPGRADED [[he used the term change :) ]] Please consult the answer of Ceribia.
  • tigrou
    tigrou almost 5 years
    Thanks for the trick. Unfortunately the 2.12 version is not there (which is the one many packages are using)
  • bluish
    bluish almost 5 years
    I could not find any .nuget folder in my solution and neither there is any nuget.exe in the whole computer...
  • Ameji012
    Ameji012 over 4 years
    for me it was Install-Package Newtonsoft.Json -Version 6.0.3
  • Nur Hidayah Roslee
    Nur Hidayah Roslee about 4 years
    I tried one by one from the latest to the least version, and 9.0.1 work for me Install-Package Newtonsoft.Json -Version 9.0.1
  • ALIRA
    ALIRA over 3 years
    I had same problem in VS2012 and though the latest version at the time is 12.0.3 the working version is 9.0.1
  • Rafael
    Rafael about 2 years
    You can go up to 9.0.1