【发布时间】:2020-01-30 05:23:44
【问题描述】:
每当我想通过我的 NetFramework 4.8 项目上的 NuGet 将我的 EFCore 引用更新到版本 3 时,我都会收到此错误。
我确认我的机器上安装了 netcore 3.0 SDK。
Could not install package 'Microsoft.EntityFrameworkCore 3.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
【问题讨论】:
-
.NET Framework 和 .NET Core 是两个不同的东西。您需要常规的实体框架。
-
@Eraph 我可以在 .net 框架 4.8 上使用 efcore 3 吗?我当前的代码使用 efcore 2.2
-
不,EF Core 面向 .NET Standard 2.1,它不(也永远不会)与 .NET Framework 4.X 兼容。
标签: .net entity-framework entity-framework-core