Sunday, December 2, 2018

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

Are you installing entity framework in your Asp.Net Core Application and getting following error ?

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 'EntityFramework 6.2.0'  supports  .NETFramework,Version=v4.6.1' not  '.NETCoreApp,Version=v2.0'.

You need to install the right version of Entity framework for your Asp.Net Core 2.0, So use this below version of entity framework, install from command.

PM>  Install-Package Microsoft.EntityFrameworkCore -Version 2.0.1 

or serach for EntityFrameworkCore 

No comments: