Unable to install 'Microsoft.EntityFrameworkCore' in VS 2017

Viewed 21083

I am using VS Professional 2017 Version 15.2 (26430.16) Release

I am trying install Microsoft.EntityFrameworkCore

Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2

I am getting the following error

Severity Code Description Project File Line Suppression State Error Could not install package 'Microsoft.EntityFrameworkCore 1.1.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0

I googled but didn't find an answer.

I have Microsoft.Net Framework Version 4.7.02046 and Visual Studio Professional 2017 Version 15.2 (26430.16) Release

2 Answers

I had this problem and where I found is that your .Net Core version has to be compatible with the Microsoft.EntityFrameworkCore. I am using .Net Core 2.1 and I found out that Microsoft.EntityFrameworkCore 2.1.1 is compatible, I guess you have to try each version if you don't know which one will be the one.

Related