0

Hello I got MSB3277 warning in child project if I reference parent project with two different dependencies.

ParentProject.csproj have:

<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Json.Microsoft" Version="6.0.0" />

Microsoft.EntityFrameworkCore.Design dependency:

  • Microsoft.EntityFrameworkCore.Relational (>= 6.0.1)

Pomelo.EntityFrameworkCore.MySql.Json.Microsoft dependency:

  • Microsoft.EntityFrameworkCore (>= 6.0.0)

ChildProject.csproj have:

<ProjectReference Include="ParentProject.csproj" />

Assembly resolotion goes fine in Parent project, but in Child I got:

warning MSB3277: Found conflicts between different versions of "Microsoft.EntityFrameworkCore" that could not be resolved.

Is it a bug in dotnet?

phuzi
  • 12,078
  • 3
  • 26
  • 50
Vlad
  • 1,017
  • 1
  • 15
  • 18
  • What EF dependencies does the child project have? Guessing it's not EF Core 6 – phuzi Dec 16 '21 at 15:10
  • Basically it is UnitTest project (.net6.0). Thich have some xUnit\FluentValidation dependencies and reference to parent project. – Vlad Dec 17 '21 at 11:36
  • A test project should use the same versions of packages that the main project uses. Not sure why you'd want EF in a **unit test** project – phuzi Dec 17 '21 at 11:39
  • Test project just reference parent project, so it is using same versions, I will create an example give me a bit time =) – Vlad Dec 22 '21 at 09:17

0 Answers0