Skip to content

8.0.0 version causes project to reference EntityFramework 9.0.7 despite when it should be net8.0 #89

@EVEI2YONE

Description

@EVEI2YONE

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.Moq 8.0.0
Image

MockQueryable.EntityFrameworkCore 8.0.0
Image

Microsoft.EntityFrameworkCore Transitive Update

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions