NuGet Package - update-database error (EntityFramework.SqlMigrations)

ef-migrations entity-framework nuget-package

Question

i installed EntityFramework.SqlMigrations NuGet Package and i get this error . it worked for me in the past and somehow, now it does not work.

PM> update-database
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 <<<< 
    + CategoryInfo          : ObjectNotFound: (update-database:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
1
15
12/19/2011 8:01:06 AM

Accepted Answer

Occurs with EF5 RTM, VS2012 RTM.

I experienced this problem today. I executed "Update-Package EntityFramework" in the PM Console. No changes were reported by NuGet and the problem persisted. I then restarted VS2012 and re-attempted Update-Database and it worked as expected. It's not clear what caused this problem, it's also not clear whether the Update-Package contributed to correcting it or not.

First try restarting Visual Studio, then try Update-Package EntityFramework followed by a restart.

23
1/15/2013 10:14:15 PM

Popular Answer

I just used this command:

Update-Package EntityFramework -Reinstall


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow