EF Core RC2 中的迁移



当我尝试添加迁移时,我得到:

实体框架工具的此预览版不支持面向 Core 和 .NET Core 应用程序中 ASP.NET 类库项目。有关详细信息和解决方法,请参阅 http://go.microsoft.com/fwlink/?LinkId=798221。

但是在我的project.json文件中,我有这个:

"frameworks": {
    "net461": {
       "buildOptions": {
          "emitEntryPoint": true
       }
    }
}

我能做什么?

谢谢!

放入 project.json 并创建一个程序.cs文件

"buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
},

我已经将包含数据模型的库转换为使用"netcoreapp1.0"框架而不是"netstandard1.5",这包括包括 Microsoft.NETCore.App 依赖项和构建选项,以及现在需要托管核心。

刚刚遇到了这个问题(自 RC2 转换以来第一次调整迁移),我现在没有找到更好的选择。我会继续挖掘,但如果你停滞不前,这个配置似乎让我暂时恢复运行。

最后 y 提出了这个:

"frameworks": {
    "net461": {
    }
},
"buildOptions": {
          "emitEntryPoint": true
}

最新更新