Rahul_Patil
Rahul_Patil

Reputation: 145

Issue with Version Conflict detected for Microsoft.EntityFrameworkCore.Install Referance 3.1.2 in .NetCore 2.2?

I m working with N-tier architecture with .netcore 2.2

see how my project structure:

MainProject Version: how I m create the project(ASP.NET Core Web Application->Next->create->Empty(select the DropDown ASP.NET Core 2.2)

enter image description here

business logic project Version: how I m create the project(class library .net core)

enter image description here

data access project Version: how I m create the project(class library .net core)

enter image description here

model project Version: how I m create the project(class library .net core)

enter image description here

Error is:


Severity    Code    Description Project File    Line    Suppression State
Error   NU1107  Version conflict detected for Microsoft.EntityFrameworkCore. Install/reference Microsoft.EntityFrameworkCore 3.1.2 directly to the project  to resolve this issue. 
 projectname-> projectname.BusinessLogic -> projectname.DataAccess -> Microsoft.EntityFrameworkCore (>= 3.1.2) 
 projectname-> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore (>= 2.2.0 && < 2.3.0).   projectname 

when I click on an error then this file display:

projectname.csproj

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.4" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\DMEBase.BusinessLogic\DMEBase.BusinessLogic.csproj" />
    <ProjectReference Include="..\DMEBase.Model\DMEBase.Model.csproj" />
  </ItemGroup>

</Project>

Only 1 error is generated in my project

how to solve this issue? help

NuGet Packages ScreenShot:

enter image description here

Write Click On Solution then I m going to Managenugetpackages->Consolidate->No Packages Found: enter image description here

Upvotes: 0

Views: 969

Answers (1)

Sher Singh
Sher Singh

Reputation: 545

Downgrade entity framework core version as compatible core framework. enter image description here

Upvotes: 1

Related Questions