I am using EF5 beta1 and while I was able to run the \"Update-Database\" before. Now that I shut down Visual Studio, I cannot get it to run. I get the following error:
I've been having this problem a number of times lately. I found the solution that worked was to close the Package Manager Console, close Visual Studio and then reopen them. Rebooting also worked most of the time, but not always.
I found that it was due to a corrupt package. I had installed Automapper when it was already installed. It was only clear that this package was corrupt when I tried to install another package.
Removing the corrupt package solved this issue for me.
You can then reinstall automapper. The issue was with version 5.4, I am now happily on 6.0.
I had this problem in VS 2019 with an existing project using EntityFramework 6.3.0. This project had some strange version changes done to it over a period of time, and nothing would get it working. I believe I tried every suggestion listed here with no luck.
Finally, updating to the pre-release version of EntityFramework (currently 6.4.0-preview3-19553-01) did fix the problem, by running this in the Package Manager Console: Update-Package EntityFramework -prerelease
. I'm hopeful that when this version is released live in the next few weeks it will work properly.
I had this problem in Visual Studio 2015 and resolved it by updating the version of Nuget.
Tools -> Extensions and Updates -> Updates -> Visual Studio Gallery
Restoring NuGet package didn'y help me. So I had to reinstall package manager - https://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca May be it helps someone
I solved with uninstall and reinstall of "Microsoft.EntityFrameworkCore" and "Microsoft.EntityFrameworkCore.Tools"