❔ NET 6 breaking changes
What does it mean? https://learn.microsoft.com/en-us/dotnet/core/compatibility/6.0
Breaking changes in .NET 6
Navigate to the breaking changes in .NET 6.
56 Replies
So binary change means if we still have compiled binaries of it it won’t have the change?
I don’t understand under what situation it WILL have a breaking change
binary compatible is you take the same binaries compiled for an older version of .net and drop them into a .net 6 project
it's not a common situation
Oooooooo
So if I have an older version targeting say NET 5 or something, it will work and not have the new behavior
if you just take the binaries
but you probably shoudln't
this is pretty much only for people consuming closed-source 3rd-party deps that haven't recompiled for new runtimes
Let’s take the
ActionResult<T>
change for example. The old version won’t have the change where it now has 200 as the status code.I simply wouldn't worry about the binary compatibility thing unless you fall into the situation I just described
What about compiles?
Compiled
you mean source compatible?
Yeah that one
Then you care about source compatibility.
then code compiled under .net 6 will have different behavior
unless you take the workaround steps outlined (if available)
Also, these changes are only comparing NET 6 to the previous (major?) release?
Like NET 5 to NET 6?
yes
Correct
So if we migrated from say NET Core 1.1 to NET6
You'd have a lot of release notes to wade through.
you'll have to look at the breaking change notes for all the in-between versions
We would need to review all the breaking changes from after 1.1 all the way to NET 6?
That makes sense
Exactly
why are you still on 1.1 😆
Business
Or.... YOLO it and see what doesn't work.
That’s what QA is currently doing
They're the ones that will have to deal with it, so... yay for them I guess.
We noticed EF Core has some LINQ translation issues we didn’t have when we were at 1.1
That's... unusual.
Oh wait.. no. maybe not.
So they asked me to go through the C# codebase and find any and all “potential” issues.
MS moved a bunch of stuff from client evaluated to server evaluated between .NET Core versions.
also you can only client-side eval in the last part of the query (thank god)
Took them a few versions to get back to what EF6 had been doing. 😄
Yeah it couldn’t handle
String.Equals(String, StringComparison)
in IQueryable<T>.Where()
pretty sure that had been client-sided
b/c that isn't translatable to SQL
EF was silently fucking you over
Yup.
We don’t need ordinal ignore case anyway
EF Core 1.1 said "can't do that in SQL, so I'll just pull everything down to the client and filter it there!"
We just throw ToLower and call it a day
(or set the column collation, if you're always doing it that way)
If you're running against SQL Server with default collations, they're case-insensitive anyway.
I believe that is set
It depends if it’s set in our migrations properly
Which I haven’t seen
If not then we could do that as tech debt
But if we get to the point where we need to support globalization and how different languages handle lower case vs upper case
The collation solution is fine
Turkish
Not if you're using OrdinalIgnoreCase
You'd also have to deal with string normalization too.
If memory serves
We were, I removed that in favor of
e => e.Foo.ToLowe() == string.ToLower()
That translates just fine
Anyway, thanks for the explanation, that makes more sense.
I was likeYeah, I think it was EF Core 3.1 or EF Core 5 that really changed the rules on how queries were translated to SQL.
I felt like I was going from Senior Developer to Senior Citizen Developer
For the better it sounds like?
Overall yeah.
These MFS are filtering, then loading the result set into memory to do ordering/group by etc
How do you remove link previews?
There's an "x" you can hover over on desktop. Not on mobile.
Lame
place the url in <>
However, if you post your link between angle brackets
<http://path to foo>
Then the preview isn't generated.
I was just lazyWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.