How do I reference the Entity Framework 6 from the .Net Core Class Library?

0

When installing the Entity Framework from Nuget I get the following error in your reference:

  

The dependency EntityFramework 6.1.3 does not support framework .NETCoreApp, Version = v1.6

How to work around this error? If anyone can help, I'll be grateful!

    
asked by anonymous 15.02.2017 / 02:37

1 answer

1

EntityFramework 6 is not supported in .NET Core. For .NET Core you need to use Entity Framework Core . You can instead use EF6 with projects made using VS2017 or .NET Core Tools , but referencing the full framework in .csproj.

<PropertyGroup>
    <TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
    <PackageReference Include="EntityFramework" Version="6.1.3" />
</ItemGroup>
    
20.04.2017 / 05:26