Update Nuget.exe in.nuget package restore folder

When upgrading to the latest version of MVC with a build server using Nuget package restore, you may get these errors indicating that Nuget is out of date:

The schema version of 'Microsoft.AspNet.Mvc' is incompatible with version 2.2.31210.9045 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
The schema version of 'Microsoft.AspNet.WebPages' is incompatible with version 2.2.31210.9045 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

The links in those errors only point you to the Nuget home page which is confusing because it does not really tell you how to update Nuget.

From this StackOverflow answer, you can use the Nuget.exe executable and tell it to update itself.  To do this open a command window in the folder where you have the old version of Nuget.exe and execute the command:

nuget.exe update –self

image

Nuget.exe will start, check for the latest version, and update itself if there is a newer version:

image

108 Comments

Add a Comment

As it will appear on the website

Not displayed

Your website