$ the-wire · showcase
Dotnet sdk adds net12 framework references, F# cleans up old flags
By RepoJournal · Filed · About .NET
The dotnet sdk has added the net12 known framework references, preparing for the next major framework release.
The net12 release prep took shape: the sdk now ships the complete live `net12.0` known framework and runtime-pack metadata set, freezes `net11.0` package and runtime versions at the preview 7 build, and locks down RID inheritance boundaries so future runtime flows won't disturb net11 metadata [1]. If you pack .nuspec files directly, `dotnet pack --no-default-excludes` and `-p:NoDefaultExcludes=true` now work, where previously files and folders starting with a dot and files ending in .nupkg were always dropped with NU5119 with no way to opt out [2]. The SDK analyzer set gains CA1878, which recommends replacing private static readonly constant-array fields with `ReadOnlySpan<T>` properties to avoid managed array allocations [3]. In F#, several always-on language feature flags were removed, including `DelegateTypeNameResolutionFix`, `LowercaseDUWhenRequireQualifiedAccess`, `PreferStringGetPinnableReference`, and `EscapeDotnetFormattableStrings`, since the minimum `--langversion` is 8.0 and these can never be off [4][5][6][7]. WinForms shipped DataGridView dark mode theming behind the `System.Windows.Forms.DataGridViewDarkModeTheming` AppContext switch, enabled by default for .NET 10 [8][9]. Mac Catalyst is now treated as a desktop platform for deciding macOS test runs, so those tests aren't skipped when a branch enables only Mac Catalyst [10]. A xharness change caps test output in the HTML report for asserts that dump a lot of text [11].
Action items
- → Review the net12 framework references for compatibility before upgrading SDK dotnet/sdk [plan]
- → Use dotnet pack --no-default-excludes when packaging .nuspec files that rely on dotfiles dotnet/sdk [immediate]
- → Test WinForms DataGridView dark mode behavior and opt out if needed dotnet/winforms [monitor]
References
- [1] Add net12 known framework references ↗ dotnet/sdk
- [2] Add `dotnet pack --no-default-excludes` ↗ dotnet/sdk
- [3] Add CA1878 to prefer ReadOnlySpan properties over readonly array fields ↗ dotnet/sdk
- [4] Remove always-on language feature flag DelegateTypeNameResolutionFix (#20366) ↗ dotnet/fsharp
- [5] Remove always-on language feature flag LowercaseDUWhenRequireQualifiedAccess (#20170) (#20365) ↗ dotnet/fsharp
- [6] Remove always-on language feature flag PreferStringGetPinnableReference (#20186) (#20370) ↗ dotnet/fsharp
- [7] Remove always-on language feature flag EscapeDotnetFormattableStrings (#20181) (#20375) ↗ dotnet/fsharp
- [8] Enable DataGridView dark mode theming via AppContext switch ↗ dotnet/winforms
- [9] Enable DataGridView dark mode theming via AppContext switch (#14267) ↗ dotnet/winforms
- [10] [devops] Run macOS tests for Mac Catalyst-only builds ↗ dotnet/macios
- [11] [xharness] Cap test output into the html report. ↗ dotnet/macios