6
votes

When downloading Entity Framework I am getting the error

Package 'EntityFramework 6.2.0' was restored using '.NetFramework, version=v4.6.1' instead of the project target framework ".NETCoreApp, Version=v2.0' This package may not be fully compatible with your project

The reason this is an issue is because when I try to enable migration it gives the following error which I think is linked back to this.

Exception calling "SetData" with "2" argument(s)

1

1 Answers

6
votes

I ran into this today too. The solution is here: https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-entity-framework-core-2-0/

Specifically:

You can start using EF Core 2.0 today by installing an EF Core 2.0-compatible database provider NuGet package in your applications.

The key is "EF Core 2.0-compatible", which means you have to install one of the Microsoft.EntityFrameworkCore packages from NuGet.

So if you're using SQL Server, you'll install Microsoft.EntityFrameworkCore.SqlServer.