Tip: EF Command Error

If you are using Entity framework in Visual Studio, you might notice that EF’s cmdlet are not working in nuget console sometimes. It’s because EF module is not loaded in nuget console for some reasons.

Error Message

The term ‘update-database’ is not recognized as the name of a cmdlet, function, script file, or operable program. Che
ck 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 <<<< -script
+ CategoryInfo : ObjectNotFound: (update-database:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException



You can use the following command to import the EF module.

Import-Module C:\Work\branches\v1\src\packages\EntityFramework.5.0.0\tools\EntityFramework.psd1

2 thoughts on “Tip: EF Command Error

  1. I found here very useful points and I apply these in my project. I would like to say your blog is really a wonderful and full new new information. Thanks a lot for the share with us

Leave a Reply

Your email address will not be published. Required fields are marked *