Visual Studio 2013 - can't update nuget.exe

Update, October 2026 — this mechanism no longer exists.

The confusing part of this bug was that Visual Studio kept a second, private copy of nuget.exe per solution, in $(SolutionDir)\.nuget\, and the version shown under Tools → Extensions and Updates said nothing about it. That whole arrangement — the .nuget folder with nuget.exe, NuGet.targets and NuGet.config, and the MSBuild-integrated restore it implemented — is gone.

  • NuGet 2.7 introduced automatic package restore, which made the checked-in nuget.exe unnecessary. Microsoft has recommended migrating away from MSBuild-integrated restore ever since.
  • Since Visual Studio 2017, projects use PackageReference and restore runs through MSBuild / dotnet restore. There is no per-solution nuget.exe.

So if you hit this error today, you are looking at a repository that still carries a .nuget folder from the Visual Studio 2013 era. The real fix is not to update that binary — it is to delete the folder and migrate the project to PackageReference.

The text from here on is the 2014 original, unchanged.


I stumbled upon a very strange error when trying to compile one of our projects lately. It says:

The ‘Microsoft.Bcl.1.1.9’ package requires NuGet client version ‘2.8.1’ or above, but the current NuGet version is ‘2.7.4090675’.

Try 1: Use the command line to get more information

I tried to execute the suggested command line in the second error by myself as an admin — no use. I got the same error ;)

Try 2: Checking the NuGet version and updating the NuGet Package Manager

I check with Visual Studio 2013 what NuGet version I have: NuGet version 2.8.5.

And — lo and behold! — I have installed NuGet v2.8.5! So why is it complaining?

I tried to uninstall and freshly install the NuGet Package Manager — no use.

Try 3: SOLVED - Update nuget.exe manually

Visual Studio is keeping its own nuget.exe for each solution (!) in a directory located at $(SolutionDirectory)\.nuget\nuget.exe along with a .targets and a .config file. In the targets file you even see at the bottom a task “DownloadNuGet” that fetches the new version of nuget.exe.

Download the file manually from nuget.org (it is located at https://www.nuget.org/nuget.exe) and copy it into the given directory. Then restart Visual Studio.

But why?

I am pretty sure there is a more elegant way of updating nuget.exe for any given solution — and I couldn’t actually locate the nuget.exe Visual Studio is actually referring to when it says in Tools → Extensions and Updates that it has the NuGet Package Manager 2.8.5 installed.

Anybody can help me out here?