8
我使用ASP.NET 5
测试版8 Entity Framework 7
测试版8DNX:错误:无法加载应用程序或执行命令“EF”
我创建了一个新的类库包使用。
我跑到下面安装软件包提示:
Install-Package EntityFramework.SqlServer -Pre
Install-Package EntityFramework.Commands -Pre
Install-Package Microsoft.AspNet.Identity.EntityFramework -Pre
我project.json
{
"version": "1.0.0-*",
"description": "MARS Class Library",
"authors": [ "myname" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"dnx451": { }
},
"dependencies": {
"EntityFramework.Commands": "7.0.0-beta8",
"EntityFramework.SqlServer": "7.0.0-beta8",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta8",
}
}
在我的包管理器控制台我浏览到我的src\project
目录在其中project.json
位于和运行任何dnx
ef
命令例如:
dnx ef migrations --help
或
dnx ef migrations add InitialMigration
不过,我得到以下错误:
dnx : Error: Unable to load application or execute command 'ef'.
At line:1 char:1
dnx ef migrations --help
~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (Error: Unable t...e command 'ef'.:String) [], RemoteException
- FullyQualifiedErrorId : NativeCommandError
我有一个的DbContext类和模型类,但错误似乎与不能够理解他们的关键字ef
所有。
我错过了什么?