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
[...]. 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.