The term 'Update-Database' is not recognized as the name of a cmdlet

user1265146 picture user1265146 · Mar 12, 2012 · Viewed 91k times · Source

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:

The term 'Update-Database' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:16 + Update-Database <<<< -verbose + CategoryInfo : ObjectNotFound: (Update-Database:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

I have tried to re-install EF5b1 and while was successful (already installed), the 'Update-Database' still does not work.

Can anyone help???

Answer

Richard picture Richard · May 14, 2012

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.