NuGet add reference error while installing packages

Solution 1:

I had this problem too, the fix that worked for me was:

  1. Delete all the folders inside of the packages folder.
  2. Update all packages in Nuget Package Manager.

Solution 2:

Suffer the same. In the end it occurs that in

Tools -> Options -> Nuget Package Manager -> Package Sources 

nuget.org was unchecked. Checking it solve the problem.