Repository navigation
Bump .NET SDK to 10 - #4326
Bump .NET SDK to 10#4326YoshiRulz wants to merge 4 commits into
Conversation
7959d59 to
51e0c3a
Compare
a503d43 to
eddff78
Compare
Morilli
left a comment
There was a problem hiding this comment.
Should probably get this in soon-ish. Dotnet 8 goes EOL in november 2026.
| <InternalsVisibleTo Include="$(MSBuildProjectName.Replace('BizHawk.', 'BizHawk.Tests.'))" /> | ||
| <Using Include="System" /> | ||
| <Using Include="System.Object" Alias="Lock" /> | ||
| <Using Include="System.Threading.Lock" Alias="Lock" /> |
There was a problem hiding this comment.
Considering this is now a proper type and has a dedicated namespace,is this alias and global using still useful?
There was a problem hiding this comment.
Since this PR also bumps $(LangVersion), it would be fine to import the whole namespace:
| <Using Include="System.Threading.Lock" Alias="Lock" /> | |
| <Using Include="System.Threading" /> |
...except doing that results in a few "ambiguous reference" errors (System.{Threading,Windows.Forms}.Timer) and a bunch of "redundant import" warnings.
There was a problem hiding this comment.
it would be fine to import the whole namespace ... except doing that results in a few "ambiguous reference" errors
Yeah that's not a good alternative either, what I'm mainly asking is: Is such a global using even sensible now that a namespace+explicit type for Lock exists? Is there a reason to make this type available everywhere without requiring a using statement? I don't really care too much, but it feels arbitrary.
There was a problem hiding this comment.
Oh I see. No, there's no reason it couldn't be imported when needed. I don't care enough to change it either.
temporarily muting IDE0031 "Use null propagation" (because of new `?=`)
eddff78 to
e9c3bb4
Compare
|
Works fine with Rider 2025.3 so I'll live. But do non-developer users have to install anything new? |
|
No, still targeting net48, and CI does the building. |
This should be delayed until at least 2026-01 so people have time to update their toolchains.C# 14 is sorely needed. VS2026 and Rider 2025.3 are out and ready for .NET 10.A change for all our Analyzers which use marker attributes (such as
[CoreSettings],[FeatureNotImplemented], or[PeripheralOption], except none of those 3 are eligible in master) is to callinitContext.AddEmbeddedAttributeDefinition();, new in Roslyn 4.14, and add[Embedded]on those attributes. That can be done in a later PR.C# 14 brings the
fieldkeyword, which will help clean up a lot. And then I could write a Source Generator to clean up even more. Neither will be adopted in this PR though.C# 14 expands on extension methods with extension props, which newer versions of Meziantou.Polyfill are already taking advantage of to add more polyfills. (Incidentally, bumping it to >= 1.0.53 causes MSBuild to fail, will investigate later.) I'm sure we could replace some of our extension methods with extension props too but that's not for this PR.
Remember to update the ApiHawk quickstart guide after this.
Did have a migration to
.slnx(#4097), but decided to split it off and wait until the format is fully-documented.Also split off some code style fixes which aren't urgent.