-
Notifications
You must be signed in to change notification settings - Fork 431
Bump .NET SDK to 10 #4326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bump .NET SDK to 10 #4326
Conversation
7959d59 to
51e0c3a
Compare
I think this is or was for ReSharper? Needs testing, and if it turns out this did something useful, hopefully it can be re-added as EditorConfig
temporarily muting IDE0031 "Use null propagation" (because of new `?=`)
84b347b to
a503d43
Compare
a503d43 to
eddff78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested whether this is even still necessary? I feel like I remember that [ ] for ArraySegments was changed to now resolve to a useful (non-null) value, but I haven't checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you revert 83d04b0 and invoke with -p:TestProjTargetFrameworkOverride=net8.0, a couple Lua unit tests fail. That's still the case after updating to .NET 10 (passing -p:TestProjTargetFrameworkOverride=net10.0, and you'll also need to revert the Lock alias in MainSlnCommon.props because ¯\_(ツ)_/¯).
I tried this as a sanity check, but it passes regardless of TestProjTargetFrameworkOverride, so the failure must be elsewhere in the BCL.
ArraySegment<int> a = [ ];
Assert.IsNull(a.Array);ArraySegment<T>.Empty is .NET Standard 2.1 or later, but it might be polyfillable now with extension props.
| private static readonly DiagnosticDescriptor DiagBrokenCollectionExpression = new( | ||
| id: "BHI1234", | ||
| title: "don't this", | ||
| messageFormat: "don't this", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO these were obviously meant to be placeholders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi: VS2026 supports DefaultStartup="true" in <Project element (in 2022 it's a no-op).
| <Folder Name="/Client/"> | ||
| <Project Path="src/BizHawk.Client.Common/BizHawk.Client.Common.csproj" /> | ||
| <Project Path="src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj" /> | ||
| <Project Path="src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Project Path="src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj" /> | |
| <Project Path="src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj" DefaultStartup="true" /> |
Apparently changes which is shown in VS2026's launch toolbar when a dev first loads the solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does seem to work on VS2026, but only if the solution has't been opened before.
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.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.
Resolves #4097, but while that's working, let's maybe not migrate until the format is fully-documented (read: drop commit before merging).