【发布时间】:2016-02-22 10:53:56
【问题描述】:
我正在尝试在 ASP.NET 5 / EF 7 项目上创建迁移。在 project.json 我有:
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final"
// Other dependencies
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel --server.urls=http://localhost:5000",
"ef": "EntityFramework.Commands"
}
我在项目文件夹内的开发人员命令提示符上运行“dnx ef migrations add 'Start'”,迁移创建没有问题...
当我在包管理控制台上运行“ef migrations add 'Start'”时,我得到:
"ef : The term 'ef' 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."
我不知道为什么会出现此错误... project.json 似乎很好...
我在这里错过了一些步骤吗?
【问题讨论】:
标签: entity-framework visual-studio-2015 asp.net-core asp.net-core-mvc entity-framework-core