EntityFramework.Docs
EntityFramework.Docs copied to clipboard
Add target framework changes to breaking changes document
The previous versions (5.0.x) were dependent on the .NETStandard 2.1, but the new version (6.0.x) is dependent only on .net6. In my opinion this is a breaking change which I haven't found it documented anywhere. It means I have to convert libraries which are shared and force everyone to upgrade to .net 6 (not a bad thing, but not all projects move with the same pace)
@theCuriousOne supported .NET implementations for each EF Core version are documented on this page. In general, EF Core versions require the corresponding .NET version (so EF Core 6 requires .NET 6).
Our experience has been that users wanting to upgrade to newer versions of EF generally also want to upgrade to newer versions of .NET; the typical upgrade process would be to first upgrade .NET, and then EF. Older versions (e.g. 3.1) are supported for users not willing to make the upgrade right away.
@roji Thank you for the quick response and the link. I understand that users upgrade both .net and EF (that is not the issue of my question). My view is that making the EF dependency change to .net 6 is a breaking change. According to this documentation I can use .net6 (and older versions .net3.1, .net5) with libraries that target .net standard, but if those libraries depend on EF I have to change the target framework on ALL that are depended of those shared libraries (consider libraries across different projects/teams)
@theCuriousOne that's correct - and it's by-design. Requiring EF Core to continue targeting old TFMs (e.g. .NET Standard) would prevent the library from taking advantage of newer features, and make things worse for new users. Note that the same strategy is taken e.g. by ASP.NET Core.
Once again, it's quite rare that we see someone wanting to upgrade to a new version of EF without also being willing to upgrade .NET; and that logic applies to libraries depending on EF Core as well. When a new version of EF Core comes out, if you want to use it, you'd frequently need a new version of that library anyway (e.g. since major versions may contain breaking changes). So as libraries are updated for the new EF Core, they themselves also need to target the new minimum TFM.
I do understand that this may make adoption slower fo newer versions of EF Core in some cases, since libraries must be updated. But the alternative would be to keep EF Core always targeting older TFMs, which is also a bad thing.
I think the main point is missed it the last conversation @roji .
I just wanted somewhere in the migration documentation to be stated that the dependency was changed - that is all.
Maybe that is "indirectly implied" or "assumed by default" for many, and I am the black sheep :)
@theCuriousOne I think you have a fair point. While we do try to make it clear in the docs, it might be a good idea to explicitly list this in breaking changes. We will discuss.
@theCuriousOne you're right, I understood this as a general discussion on which .NET version EF should target, and not as a documentation question!