Rider generating incorrect package references for dependant projects
I have solution with 2 dotnet 6.0 library projects using c# 10
Lib1 references the nuget package Pomelo.EntityFrameworkCore.MySql/6.0.1
which in turn references Microsoft.EntityFrameworkCore.Relational/6.0.5
Lib2 references Lib1 as a project however when I drill down through the dependencies, I see Projects > Lib1 > Pomelo.EntityFrameworkCore.MySql/6.0.1 > Microsoft.EntityFrameworkCore.Relational/6.0.1
which is incorrect - and causes version warnings when compiling lib2 :
Microsoft.Common.CurrentVersion.targets(2302, 5): [MSB3277] Found conflicts between different versions of "Microsoft.EntityFrameworkCore.Relational" that could not be resolved.
There was a conflict between "Microsoft.EntityFrameworkCore.Relational, Version=6.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"
and "Microsoft.EntityFrameworkCore.Relational, Version=6.0.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60".
My question is - where is this error happening - is this a rider problem or a nuget problem or an msbuild problem or ... ?
Please sign in to leave a comment.
Hello, could you please try building your solution using `dotnet build` command and let me know if you face the same error? That will help us to isolate the issue.
Sorry for the delay I will try to get to this sometime later today :)
Hi - yes same error - see below
I found that if I specifically add version 6.0.5.0 of the Microsoft.EntityFrameworkCore.Relational package to the Gms.Data library, then that version is used everywhere. If not then we run into the situation below. Is this possibly something in the way that the Pomelo package was built ?
Similar issue was discussed there: https://github.com/dotnet/msbuild/issues/2478 Since you mentioned that it is reproduced with dotnet command, then it looks like the reason for it is related to MSBuild issue. Can you also check if suggested workaround helps with warnings?