All, I recently started working on a project that uses EF Core 1.1.2. I saw where 2.0 was released because I started getting errors when I tried to add EF core to a project. I couldn't update the existing project, I created a brand new console project. Set the .Net framework to 4.6.1 and still had no luck. I always get the following message. Has anyone ran into this issue? thanks in advance
Install-Package : Could not install package 'Microsoft.EntityFrameworkCore.SqlServer 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework.
Of course it's not NET Core only. But the actual prerequisites for targeting Full .NET Framework are as follows:
(1) Project targeting .NET Framework 4.6.1 and above.
(2) Visual Studio 2017 with (important!) 15.3.0 update (also just released) installed
Before updating the VS I was getting the same error. After updating the error is gone and EF 2.0 package is successfully installed.
EF Core 1.1.2 had a dependency on .NETStandard 1.3 or .NETFramework 4.5.1. So as you were targeting .NetFramework 4.5.2 everything is hunky dory.
EF Core 2.0 has a dependency on .NETStandard 2.0. This is not compatible with the .NETFramework, everything is far from hunky dory.
According to the source below you can get .NetFramework support with 2.0 tooling, which is in preview:
The alternative would be to migrate your application so it doesn't use the .NetFramework but only targets .NETStandard libraries.