NuGet Package Restore Not Working

There is a target in their project file that can become problematic when projects are moved between systems.

You can fix the problem with two steps:

  1. Remove the entire <Target Name="EnsureNuGetPackageBuildImports" ..> element at the end of the project file, then reload the project.
  2. Execute an Update-Package -Reinstall in your (NuGet) Package Manager Console.

That should set everything right for your system and re-point to the correct versions of the relevant libraries.


Try to delete packages folder at solution root and rebuild or restore packages again.

Tags:

Nuget