-
-
Notifications
You must be signed in to change notification settings - Fork 84
Description
I'm using EntityFramework 8.0.19.
I installed MoqQueryable.Moq 8.0.0 which says it depends on MoqQueryable.EntityFrameworkCore 8.0.0 and is listed as net8.0 dependencies.
However, MoqQueryable.EntityFrameworkCore says it uses Microsoft.EntityFrameworkCore >= 9.0.7
This is a breaking change because my project is .NET 8 which is what the entire package is listed as for 'net8.0'
Microsoft.EntityFrameworkCore is very particular about having the same version. If i wanted 9.0, then I would've updated my project to be .NET 9.0
I get this exception
System.TypeLoadException : Could not load type 'Microsoft.EntityFrameworkCore.Metadata.Internal.AdHocMapper' from assembly 'Microsoft.EntityFrameworkCore, Version=9.0.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
I check and I see that my Microsoft.EntityFrameworkCore is now referencing 9.07 instead of 8.0.19.
When I try to do a top-level installation to go back to 8.0.19, I get this error:
Warning As Error: Detected package downgrade: Microsoft.EntityFrameworkCore from 9.0.7 to 8.0.19. Reference the package directly from the project to select a different version.
eFRBilling.RulesEngine.API.Test -> MockQueryable.EntityFrameworkCore 8.0.0 -> Microsoft.EntityFrameworkCore (>= 9.0.7)
eFRBilling.RulesEngine.API.Test -> Microsoft.EntityFrameworkCore (>= 8.0.19)
MockQueryable.EntityFrameworkCore 8.0.0

Microsoft.EntityFrameworkCore Transitive Update

