EF Core RC2 中的迁移
Migrations in EF Core RC2
当我尝试添加迁移时,我得到:
This preview of Entity Framework tools does not support targeting class library projects in ASP.NET Core and .NET Core applications. See http://go.microsoft.com/fwlink/?LinkId=798221 for details and workarounds.
但是在我的 project.json
文件中我有这个:
"frameworks": {
"net461": {
"buildOptions": {
"emitEntryPoint": true
}
}
}
我能做什么?
谢谢!
我已经将包含我的数据模型的库转换为使用 "netcoreapp1.0" 框架而不是 "netstandard1.5",这包括包括 Microsoft.NETCore.App 依赖项和构建选项,并且需要托管核心现在。
我 只是 运行 进入了这个(自 RC2 转换以来第一次调整迁移),我现在找不到更好的选择。我会继续挖掘,但如果你停滞不前,这个配置似乎让我现在 运行ning 回来。
输入您的 project.json 并创建一个 Program.cs 文件
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
你终于发布了这个:
"frameworks": {
"net461": {
}
},
"buildOptions": {
"emitEntryPoint": true
}
当我尝试添加迁移时,我得到:
This preview of Entity Framework tools does not support targeting class library projects in ASP.NET Core and .NET Core applications. See http://go.microsoft.com/fwlink/?LinkId=798221 for details and workarounds.
但是在我的 project.json
文件中我有这个:
"frameworks": {
"net461": {
"buildOptions": {
"emitEntryPoint": true
}
}
}
我能做什么?
谢谢!
我已经将包含我的数据模型的库转换为使用 "netcoreapp1.0" 框架而不是 "netstandard1.5",这包括包括 Microsoft.NETCore.App 依赖项和构建选项,并且需要托管核心现在。
我 只是 运行 进入了这个(自 RC2 转换以来第一次调整迁移),我现在找不到更好的选择。我会继续挖掘,但如果你停滞不前,这个配置似乎让我现在 运行ning 回来。
输入您的 project.json 并创建一个 Program.cs 文件
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
你终于发布了这个:
"frameworks": {
"net461": {
}
},
"buildOptions": {
"emitEntryPoint": true
}