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

ef-migrations entity-framework nuget-package

Question

I'm getting this problem after installing the EntityFramework.SqlMigrations NuGet package. It used to work for me in the past, but for some reason it doesn't today.

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

happens with zzzz-5 zzzz.

This issue presented itself to me today. In the PM Console, I ran "Update-Package EntityFramework." NuGet reported no changes, hence the issue continued. When I restarted Visual Studio 2012 and tried Update-Database again, it performed as anticipated. It's unclear what created this issue, and it's also unclear whether or not the Update-Package had a part in fixing it.

Try restarting Visual Studio first, then Update-Package EntityFramework and then Visual Studio again.

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

Popular Answer

My most recent command was:

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