Skip to content

Move to the .NET 11 SDK and net11.0 - #3

Open
BenjaminMichaelis wants to merge 9 commits into
mainfrom
feat/net11
Open

BenjaminMichaelis wants to merge 9 commits into
mainfrom
feat/net11

Conversation

@BenjaminMichaelis

Copy link
Copy Markdown
Owner

Moves the repo to the .NET 11 SDK (11.0.100) and net11.0, as a single-target upgrade in the same shape as the earlier ones in dotnet/interactive: 3e595984 (.NET 7 to 8), 1c35640c (8 to 9) and #4093 (9 to 10, 33ded6f5). Each of those swapped the tool from netN to netN+1 and the libraries from netstandard2.0;netN.0 to netstandard2.0;netN+1.0, moving users up one version in one step. Nothing in the repo history ships two .NET versions side by side, so this PR doesn't either.

Breaking change: the tool now requires the .NET 11 runtime

Microsoft.dotnet-interactive contains only tools/net11.0/any. Machines with only the .NET 10 runtime or SDK cannot install or run it; they must stay on the previous tool version (or install .NET 11). The VS Code extensions now require the .NET 11 SDK (minDotNetSdkVersion = '11.0').

Target frameworks

Category Projects Now
Tool dotnet-interactive net11.0
Libraries/extension packages that were net10.0 AspNetCore, CSharpProject, DuckDB, ExtensionLab, FSharp, Http, Journey, Jupyter, Kql, Mermaid, PackageManagement, PostgreSql, PowerShell, SQLite, SqlServer, Telemetry, VSCode net11.0
Libraries that were netstandard2.0;net10.0 Microsoft.DotNet.Interactive, Browser netstandard2.0;net11.0
netstandard2.0 libraries CSharp, Documents, Formatting, Http.Parsing, NamedPipeConnector unchanged
Tests, interface-generator, perf-tests, SampleConsole test project, samples/* net11.0 (NetFramework.Tests stays net472)

Pack layout, checked from a local dotnet pack of the whole solution: the tool nupkg has only tools/net11.0/any; library nupkgs have lib/net11.0 (plus lib/netstandard2.0 for Microsoft.DotNet.Interactive and Browser); the netstandard2.0-only packages are unchanged.

Other changes

  • global.json: sdk.version and tools.dotnet are 11.0.100 (rollForward unchanged).
  • Dependency bumps, applied to the single target (no per-TFM versions): Microsoft.Data.Sqlite 10.0.0 to 11.0.0 (brings SQLitePCLRaw 3.0.5; the repo has no direct SQLitePCLRaw references); Azure.Core 1.50.0 to 1.53.0 and Azure.Identity 1.17.1 to 1.21.0; Microsoft.Diagnostics.Runtime 2.2.343001 to 4.2.751201 (2.x and 3.x throw "CLR debugging layer reported a version of 10" on the .NET 11 runtime).
  • Inspect extension (ExtensionLab JIT Asm tab): ClrMD 4.x cannot attach to its own process, so it uses a process snapshot (DataTarget.CreateSnapshotAndAttach). Because a snapshot is point-in-time, the decompiler JIT-compiles all target methods first, then takes a fresh snapshot and disposes it afterwards (the pooled runtime was removed); if no snapshot can be created the tab says so. New JitAsmDecompilerTests assert real instructions and no "Failed to find HotColdRegions" / "Unknown Method" (they failed on the earlier approach). They pass on both Windows and Ubuntu CI.
  • CSharpProjectKernel derives its language version from Roslyn (was a stale "13.0", now 15.0).
  • PackageRestoreContext restores for net11.0.
  • Tests and helpers that hard-coded net10.0 / SDK 10.0.100 (KernelExtensionTestHelper, StdIoKernelConnectorTests) use net11.0 / 11.0.100. New test: C# 15 union types in the C# kernel.
  • CI: actions/setup-dotnet is unchanged (global-json-file installs the 11.0.100 SDK, which is all that is needed). publish.yml uses 11.0.x for the NuGet push job, which has no checkout and so no global.json.
  • .devcontainer now uses mcr.microsoft.com/devcontainers/dotnet:11.0 (the tag exists and carries SDK 11.0.100); DEVELOPER-GUIDE.md, eng/AfterSolutionBuild.targets (symbol-package strip paths), the VS Code DotNetVersion.md help pages and READMEs, and docs/NotebookswithJupyter.md (which still said .NET 9) updated for .NET 11.
  • Restored the original CRLF line endings on eng/perf-tests/perf-tests.csproj and BasicConsoleApp.csproj so their diffs are the one-line TFM change.

Consumer-facing notes

  • net10 users: stay on the previous tool version, or move to .NET 11.
  • Extensions and libraries built for net10.0 still load in the net11 tool: I packed a net10.0 library, referenced it with #r "nuget:" from the locally installed net11 tool, and used it (NuGet resolves the lib/net10.0 asset for net11.0). Extensions built only for net11.0 need the net11 host, which is now the only host.
  • Library packages no longer carry lib/net10.0; net10 projects referencing the new versions would not restore them.

Breaking-change checklist

  • SYSLIB0063: not applicable (NamedPipeKernelConnector uses a different constructor and is netstandard2.0).
  • NETSDK1235: not applicable (no custom NuspecFile with PackAsTool); pack of the tool is clean.
  • SQLitePCLRaw 3.0: taken with Data.Sqlite 11.0.0; SQLite tests pass.
  • BackgroundService/Hosting change: not applicable (Heartbeat/Shell are plain IHostedService).
  • C# 15 compiler changes: no new warnings or errors in the build.
  • Not applicable by inspection: compression/TAR/Zip behaviors, DSA on macOS, AIA, NativeAOT.

Verification

  • Locally with SDK 11.0.100 and DisableArcade=1: full-solution restore and build, dotnet pack of the whole solution (package layouts above), and tests for ExtensionLab (18 passed, 1 skipped), CSharp, SQLite, SqlServer (build; most need a server), Journey, dotnet-interactive.Tests, ApiCompatibility; all passed.
  • The packed tool was installed with dotnet tool install --tool-path and driven over stdio: Environment.Version.Major returned 11, and #r "nuget: Newtonsoft.Json, 13.0.3" restored and was used.
  • CI run 44408327976 on head 02c52939, attempt 1: build (windows-latest) succeeded. build (ubuntu-latest) failed only on the known MultipleInputsWithinMagicCommandsTests hang (all 5 retry attempts), plus a one-off PrebuildTests.If_a_build_is_in_flight_then_the_second_one_will_wait_on_it_to_complete failure on its first attempt that passed on retry. That run was re-run once (--failed); see the PR checks for the result. The previous two-target design of this PR had passed CI on both OSes (run 44378422597), including the ExtensionLab/JIT asm tests on Ubuntu.
  • The Arcade pipeline path (eng/CIBuild) is exercised by the CI jobs; I did not run Arcade locally.

Left alone on purpose (follow-ups)

  • EF Core stays at 10.0.0 (also in the generated #r nuget lines of the SQL Server kernel). EF Core 11.0.0 exists, but its SqlServer provider requires Microsoft.Data.SqlClient 7.1.1, which this repo deliberately holds at 6.1.3 (7.x moves Entra ID auth to a separate package), and the scaffolding path in ConnectMsSqlDirective can't be exercised without a SQL Server. It should be done together with a SqlClient 7 change.
  • Other pins that could move to 11.x but were not changed because nothing requires it and they would be speculative: Microsoft.Extensions.Hosting, Microsoft.AspNetCore.SignalR.Client, Microsoft.AspNetCore.Mvc.Testing (all 10.0.0; 11.0.0 exists), System.Drawing.Common/System.Security.Cryptography.*/System.Runtime.Caching (10.0.0, PowerShell SDK transitive pins), FSharp.Core 10.0.103 and FSharp.Compiler.Service 43.10.103 (11.0.101 exists but is paired with the F# compiler), Microsoft.PowerShell.SDK 7.5.4 (7.7.0 exists). The 10.0.10 floors (System.Text.Json, System.Collections.Immutable, System.Reflection.Metadata, System.IO.Pipelines, Microsoft.Bcl.AsyncInterfaces, Microsoft.Extensions.Logging.Abstractions) come from the Roslyn 5.12 PR and still serve the netstandard2.0 targets.
  • NOTICE.txt (shipped in the tool) is generated by Component Governance tooling that is not in this repo and was last refreshed in January: it still lists Microsoft.Data.Sqlite 10.0.0, Azure.Core 1.50.0, Azure.Identity 1.17.1, SQLitePCLRaw 2.1.11 and has no Microsoft.Diagnostics.Runtime entry. Regenerate it; not hand-edited.
  • The Arcade-based internal pipelines (azure-pipelines*.yml, tools.dotnet bootstrap download) were not run.
  • Known flake: MultipleInputsWithinMagicCommandsTests (PowerShell kernel, JSON binding) can hang for 10 minutes per attempt, mostly on Ubuntu; the retry runner usually recovers it and main's scheduled run has hit the same hang. PrebuildTests.If_a_build_is_in_flight_then_the_second_one_will_wait_on_it_to_complete also failed once and passed on retry; it is a possible second flake.
  • The JIT asm snapshot is slow on Linux: the ExtensionLab test project took about 1m38s on Ubuntu CI versus 7s on Windows (ClrMD snapshotting on Linux). It passes, but each #!inspect on Linux pays that cost.
  • Jupyter/Documents C# language version defaults ("13.0") are untouched.
  • NU1510 warnings (Microsoft.Extensions.Logging.Abstractions, System.ComponentModel.Annotations in CSharpProject) appear with SDK 11 pruning; the explicit references could be removed separately.

Commits

  • 5b38d9c6 Move to the .NET 11 SDK and net11.0; 493da5dc packaging and ClrMD support
  • 32723293 CRLF line endings restored
  • 89b0603f JIT asm inspector fix and tests
  • cc9a0e88 devcontainer .NET 11 image
  • 7052563b net11.0-only: single TFMs, removal of everything that existed only for dual targeting (net10 smoke test, TFM-conditional package versions, PackageRestoreContext #if, Journey pack path, samples, VS Code and docs updates)
  • 02c52939 MANUAL-TESTING doc
    (Intermediate commits 465db40 and 1549fbe added a net10 smoke test and TFM-conditional package versions; both are removed again by 7052563.)

Recreated on 2026-11-21 after the repo was re-forked from dotnet/interactive (was dotnet#13). Links to Actions runs from before that date no longer resolve; CI will re-run on this PR.

- global.json: SDK/tools 11.0.100
- dotnet-interactive tool and the libraries it loads multi-target net10.0;net11.0 so the tool still runs where only the .NET 10 runtime is installed
- tests, samples, interface-generator and perf-tests target net11.0
- PackageRestoreContext restores for the TFM the assembly was built for
- CSharpProjectKernel derives its language version from Roslyn
- Microsoft.Data.Sqlite 11.0.0
- CI: install the .NET 10 runtime next to the global.json SDK and smoke-test the net10.0 tool build
- add a C# 15 union types kernel test
- Journey: pack the net10.0 extension dll explicitly; OutputPath has no TFM folder in the multi-targeted pack
- ExtensionLab: Microsoft.Diagnostics.Runtime 4.2.751201 (2.2 rejects the .NET 11 debugging layer), with Azure.Core 1.53.0 and Azure.Identity 1.21.0 as ClrMD requires; use CreateSnapshotAndAttach and GetMethodByHandle for the changed ClrMD API
…nstead of a fixed timeout, and gate on build success
…and Azure.Identity with TFM-conditional versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant