Install nuget package : EntityFramework 6 in .NETStandard 2.0 class library

.net-standard-2.0 entity-framework-6

Question

I installed nuget package: EntityFramework 6 in .NET Standard2.0 Class library. On building the project I am getting the below warning message:

NU1701:Package 'EntityFramework 6.2.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

Does it mean that we cannot use EntityFramework 6 in .NETStandard 2.0 class library?

Can anyone help me here by providing their inputs

1
1
11/1/2018 10:06:15 AM

Accepted Answer

[...]. This package may not be fully compatible with your project.

Entity Framework 6 will be compatible with a project that target .NET Framework but will not be compatible with a project that target .NET Core

The answer is yes, you can use EF6 with .NET Standard 2.0 class library as long as you plan to only support .NET Framework

Microsoft already announced they plan to release a version of EF6 that support .NET Core at the end of 2019.

Disclaimer: I'm the owner of the project Entity Framework Classic

Entity Framework Classic is an EF6 fork. It's everything you like about EF6, but with better performance, must-have features, .NET Core support, and more.

It's currently the only option available to use a EF6 fork on a project that target NET Core

There is a free Community version that includes pretty much everything and an Enterprise version that include additional features.

2
11/1/2018 12:48:27 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow