Never had a problem doing this before, but today, when I run the command Install-Package Microsoft.EntityFrameworkCore
, the following error ensures:
NU1107: Version conflict detected for Microsoft.EntityFrameworkCore.Abstractions. Install/reference Microsoft.EntityFrameworkCore.Abstractions 2.2.1 directly to
project WebApplication1 to resolve this issue.
WebApplication1 -> Microsoft.EntityFrameworkCore 2.2.1 -> Microsoft.EntityFrameworkCore.Abstractions (>= 2.2.1)
WebApplication1 -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.EntityFrameworkCore.Abstractions (>= 2.1.1 && < 2.2.0).
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package restore failed. Rolling back package changes for 'WebApplication1'.
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Really not quite sure how to resolve it.
I attempted to install a previous version to no avail: Install-Package Microsoft.EntityFrameworkCore -Version 2.1.0
To use Entity Framework 6, your project has to compile against . NET Framework, as Entity Framework 6 doesn't support . NET Core. If you need cross-platform features you will need to upgrade to Entity Framework Core.
You need to install NuGet packages for the following two things to use EF Core in your application: EF Core DB provider. EF Core tools.
I had the same problem and I just installed EFCore 2.1.11. It seems that EFCore and AspNetCore go side by side in versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With