【发布时间】:2015-11-26 20:53:08
【问题描述】:
我的解决方案有 3 个项目:
- Web(我在 appsetting 文件中添加了连接字符串)
- 业务(包含模型类)
- 基础架构(包含 DbContext)
我尝试进行迁移:
dnx ef migration add firstMigration -s Web
我遇到了这个错误:
System.InvalidOperationException: The current runtime target framework is not compatible with 'Infrastructure'.
Current runtime target framework: 'DNX,Version=v4.5.1 (dnx451)'
Version: 1.0.0-rc1-16202
Type: Clr
Architecture: x86
OS Name: Windows
OS Version: 10.0
Runtime Id: win10-x86
Please make sure the runtime matches a framework specified in project.json
当我放入 dnvm 列表时,我有 1.0.0-rc1-final 就像默认运行时一样,但我在列表中找不到 1.0.0*rc1-16202 ?
Infrastuture 项目的 projet.json 文件是:
"frameworks": {
"dotnet5.4": {
},
"net451": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"frameworkAssemblies": { "System.Runtime": "4.0.10.0" }
}
}
【问题讨论】:
标签: asp.net-core entity-framework-core