Unable to Install Microsoft.EntityFrameworkCore in ASP.NET Core Project

asp.net-core-2.1 entity-framework entity-framework-core

Question

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

1
6
6/10/2019 1:49:55 PM

Popular Answer

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.

0
6/10/2019 1:47:32 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow