#StackBounty: #entity-framework-core #netcoreapp2.2 NU1107: Version conflict detected for Microsoft.EntityFrameworkCore.Abstractions. I…

Bounty: 50

I was able to upgrade my .NetStandard2.0 project to use EntityFrameworkCore 3.1.4 and created a nuget package.

Now I want to use that nuget package in my netcoreapp2.2 project.

However, when I try to add the package via nuget I get

Error   NU1107  Version conflict detected for Microsoft.EntityFrameworkCore. Install/reference Microsoft.EntityFrameworkCore 3.1.4 directly to project MyApi to resolve this issue. 
 MyApi -> SBDSTD.Standard 1.0.0-CI-20200526-230146 -> Microsoft.EntityFrameworkCore (>= 3.1.4) 
 MyApi -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore (>= 2.2.0 && < 2.3.0).    MyApi   D:devMyApiMyApiMyApi.csproj 1

So I tried to install the Entity Framework Packages using

Install-Package Microsoft.EntityFrameworkCore -Version 3.1.4

I got

NU1608: Detected package version outside of dependency constraint: Microsoft.AspNetCore.App 2.2.0 requires Microsoft.EntityFrameworkCore (>= 2.2.0 && < 2.3.0) but version Microsoft.EntityFrameworkCore 3.1.4 was resolved.
Install-Package : NU1107: Version conflict detected for Microsoft.EntityFrameworkCore.Abstractions. Install/reference Microsoft.EntityFrameworkCore.Abstractions 3.1.4 directly to project 
MyApito resolve this issue. 
 MyApi-> Microsoft.EntityFrameworkCore 3.1.4 -> Microsoft.EntityFrameworkCore.Abstractions (>= 3.1.4) 
 MyApi-> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore.Abstractions (>= 2.2.0 && < 2.3.0).
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore -Version 3.1.4
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

I aren’t willing to start trying to install the suggested package because I have just lost half a day doing similar things in the Package Manager UI


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.