Nuget versioning issue with package restore

nugetvisual studio 2010

I am unable to install a package (using package restore) due to some kind of versioning issue with Nuget. Here are the steps I took:

build project:
error : The schema version of 'MagicalUnicorn.MvcErrorToolkit' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

Extension manager says version is: 2.0.30619.9119.

Ok, restart VS as administrator, extension manager uninstall nuget.
restart VS as administrator again, search for nuget and install.

Extension manager again says version is: 2.0.30619.9119.

rebuild project:
error : The schema version of 'MagicalUnicorn.MvcErrorToolkit' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

Ok, so restart VS as administrator, extension manager uninstall nuget again.
This time download from http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c
Run the installer, all seems ok.

Extension manager again says version is: 2.0.30619.9119.

rebuild project:
error : The schema version of 'MagicalUnicorn.MvcErrorToolkit' is incompatible with version 1.6.21205.9031 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

Grr! Any ideas?

Best Answer

It looks like problem in nuget command line tool. When you enable 'Nuget package restore' feature it adds .nuget folder to you solution with nuget.exe. And when you compile project this tool is using to download missing packages, not VS extension is used here. So try update this tool from command line:

cd .nuget
nuget.exe update -Self

Procedure screenshot:

enter image description here

Related Topic