|
After upgrading from 4.0.1 to 4.1.1, the compiler (?) is now choosing the Null extension method where the What am I doing wrong here? |
Replies: 2 comments 4 replies
|
I changed my project from targeting .NET 6 to target .NET 7 and it now chooses the correct method definition. I wouldn't think that I would need to change my target version when the else branch of the if-statement should still apply. We have not committed to targeting .NET 7 yet because .NET 6 is the LTS version. Please advise. |
|
Yeah that's weird and unexpected. Maybe the problem (for you, at least) goes away in a couple of months when .NET 8 is LTS... :) I'll see if I can repro the issue and work out a fix. I've updated a bunch of my projects, some net6 some net7, and haven't seen this. |


@ardalis is my question now closed due to the fix on #303??