i'm using entity framework data migrations. if i change something about entites or something else, i try to use "add-migration MyFirstMigration" on Package Manager Console. But it returns an exception :
The term 'add-migration' 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 inclu
ded, verify that the path is correct and try again.
At line:1 char:14
+ add-migration <<<<
+ CategoryInfo : ObjectNotFound: (add-migration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
if i uninstall EntityFramework.Migrations from Nuget and re-install it's working with same code ("add-migration MyFirstMigration","update-database") till close project.
how can i fix it ? anyone else experiencing this?
EDIT : it works fine on another pc by the way...
I ran into this also, although I am testing VS 11 and EF5, so this may not apply to you. It could be a couple of things.
You have to open VS in the following order:
If you close VS, when the package manager console is open, it remembers that. Then, when you reopen VS, the package manager console is already open before you open your project and it gets confused.
The other possibility is that you have other EF packages installed that don't know about "add-migration" and they are geting in the way.
Run "get-package" in the package manager console, to see what is installed. Remove the unnecessary/old stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With