Already entered Install-Package EntityFramework.Commands –Pre, but when I try Add-Migration Initial, I get the following error:
The EntityFramework package is not installed on project '…'.
As another key, when I try to execute a command Use-DbContext, I also get an error message. Here is my package manager console session:
PM> Install-Package EntityFramework.Commands –Pre
Package 'EntityFramework.Commands.7.0.0-rc1-final' already exists in project '…'
PM> Add-Migration Initial
The EntityFramework package is not installed on project '…'.
PM> Use-DbContext
Use-DbContext : The term 'Use-DbContext' 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:1
+ Use-DbContext
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Use-DbContext:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What am I doing wrong?
source
share