Package ‘EntityFramework 6.2.0’ was restored using ‘.NETFramework,Version=v4.6.1’ instead of the project target framework ‘.NETCoreApp,Version=v2.0’

The problem is your entity version is confused with .NetFramework and .NetCore. Your application target framework is Asp.Net Core. So You should install package related with Asp.net Core

In your case 'EntityFramework 6.2.0' is supports by .NETFramework,Version=v4.6.1' not by '.NETCoreApp,Version=v2.0'. So use this below version of entity framework instead of yours.

PM>  Install-Package Microsoft.EntityFrameworkCore -Version 2.0.1 

3rd party

If Nuget is not installed this command should do it

dotnet add package Microsoft.EntityFrameworkCore

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)