aspnetcore: Microsoft.AspNetCore.Identity.EntityFrameworkCore 7 not compatible with .net 6
Hi, can you please explain, why does Microsoft.AspNetCore.Identity.EntityFrameworkCore 7.0.* package is not compatible with .net 6, though EF Core is compatible?
I’ve an issue with transitive dependencies, because project A has dependency on Microsoft.AspNetCore.Identity.EntityFrameworkCore 6.0.*, which dependent on Microsoft.EntityFrameworkCore.Relational (>=6.0.*). The project B depends on project A and has Microsoft.EntityFrameworkCore.Design package installed, which has a transitive dependency on Microsoft.EntityFrameworkCore.Relational (>=7.0.*).
Is it safe to install in project A dependency Microsoft.EntityFrameworkCore.Relational (>=7.0.*)?
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 21 (10 by maintainers)
@martincostello, thank you for your support!
If you’ve already mixed them, I guess you need to just stick with the status quo you have now until the cryptographic libraries support .NET 7 or 8.
Then you can upgrade everything to 7.0.x/8.0.x at that time and stay aligned on the same major version for all the packages going forward.
Thanks for helping out with this, @martincostello!
We definitely agree with @martincostello here. Mixing versions is not something we support nor recommend.
That all sounds incredibly custom and probably not something that the .NET teams are going to explicitly support. I’m not going to go digging around and researching how that works.
ASP.NET Core is generally built to only support the version of .NET it is released as part of, so ASP.NET Core Identity 7 depends on EFCore 7 etc. so everything is aligned.
EFCore 7 itself targets
net6.0, making it usable for .NET 6 and .NET 7, rather than only .NET 7. ASP.NET Core doesn’t work with both though.Generally, you should use 6.x or 7.x versions of the NuGet packages produced by the .NET teams together, not mix and match 6 and 7 versions.
For now, you should use ASP.NET Core 6 and EFCore 6 together with your custom libraries, and request that they add support for .NET 7 and/or .NET 8 so you can upgrade to a newer ASP.NET Core version.
ASP.NET Core will depend on new APIs added as part of .NET 7 as it’s built on top of it, so it doesn’t support being used on older versions like .NET 6.