Skip to content

Update to .NET 10 - #724

Merged
LukeButters merged 5 commits into
mainfrom
orion/build-net10
Oct 9, 2026
Merged

LukeButters merged 5 commits into
mainfrom
orion/build-net10

Conversation

@borland

@borland borland commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Moves the repository from .NET 8 to .NET 10.

Breaking change (deliberate)

The library now targets net48;net10.0 on Windows and net10.0 elsewhere. net8.0 is dropped, so consumers on .NET 8/9 will need to move to .NET 10. net48 is unchanged.

Changes

  • global.json SDK 8.0.303 → 10.0.100; all net8.0 TFMs/conditions → net10.0
  • Nuke.Common 8.0.0 → 10.1.0, nuke.globaltool 6.0.3 → 10.1.0; Build.cs adapted to Nuke 10 APIs (target names CompileNet80/TestWindowsNet80 kept so CI config doesn't change)
  • Octopus.OctoVersion.Tool 0.3.400 → 1.1.79 (old version only ran on .NET 8)
  • Library NuGet deps: net10.0 group drops Microsoft.CSharp and System.Reflection.DispatchProxy (in-box). net48 group unchanged. No other runtime dependency changes.
  • SYSLIB0057/SYSLIB0014 suppressed where net48 compatibility needs the obsolete APIs
  • WebSocketStream fully qualified internally (ambiguous with the new System.Net.WebSockets.WebSocketStream). Consumers importing both namespaces will hit the same ambiguity.
  • Async LINQ: System.Interactive.Async is now net48-only, with a small test helper to avoid clashes with the in-box System.Linq.AsyncEnumerable
  • Test/build dependency updates (Testcontainers 4.16, NSubstitute 6, Microsoft.NET.Test.Sdk 18, VS.Threading 18, Microsoft.Extensions.* 10, FluentAssertions 7.2.2, SourceLink 10.0.401, and others). NUnit kept on 3.x (5.x has breaking Assert.ThrowsAsync changes); Assent pinned to 1.9.3 (3.x dropped net48); FluentAssertions kept < 8 (licence)
  • System.Drawing.Common 5.0.3 pinned in the v6.0.658 compat test project. The .NET 10 SDK audits transitive packages, and the old Halibut package pulls in vulnerable 5.0.0.
  • Test fixes: compressed-size expectation is 57 bytes on .NET 9+ (zlib-ng) vs 55 on net48. Added the missing single-space variant to a flaky EOF exception-message assertion.

Testing

  • Solution builds with 0 warnings/errors on net10.0, and on net48 (forced locally on macOS via reference assemblies)
  • ./build.sh --target CompileNet80 succeeds
  • net10.0 tests on macOS: 1020/1022 pass. The 2 failures are TcpKeepAliveShouldBeSetOnPollingSocketsByDefault, which also fails on main on macOS (unrelated).
  • net48 tests not run locally (need Windows CI)

🤖 Generated with Claude Code

borland and others added 3 commits October 9, 2026 14:29
- global.json SDK 8.0.303 -> 10.0.100
- Retarget net8.0 -> net10.0 (net48 retained on Windows)
- Nuke.Common 8.0.0 -> 10.1.0 and nuke.globaltool 6.0.3 -> 10.1.0; adapt Build.cs to Nuke 10 APIs
- Remove/condition package references that are in-box on net10.0 (NU1510)
- Bump build/test-only packages flagged by NuGet audit: SourceLink 10.0.401, SSH.NET 2026.0.0, System.Drawing.Common 5.0.3
- Suppress SYSLIB0057/SYSLIB0014 where net48 compatibility requires the obsolete APIs
- Resolve WebSocketStream and async LINQ ambiguities with new .NET 10 BCL types
- Adjust compressed-size test expectations for zlib-ng on .NET 9+

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Assent 1.8.2 -> 3.0.1
- CliWrap 3.8.2 -> 3.10.5
- FluentAssertions 7.0.0 -> 7.2.2
- Microsoft.Extensions.Configuration.EnvironmentVariables 7.0.0 -> 10.0.12 (Halibut.Tests), 6.0.1 -> 10.0.12 (Halibut.Tests.DotMemory)
- Microsoft.Extensions.Hosting 7.0.1 -> 10.0.12 (Halibut.TestProxy)
- Microsoft.Extensions.Hosting.Abstractions 7.0.0 -> 10.0.12 (Halibut.TestProxy)
- Microsoft.NET.Test.Sdk 17.13.0 -> 18.10.1
- Microsoft.VisualStudio.Threading 17.13.61 -> 18.7.23
- NSubstitute 5.3.0 -> 6.2.0
- NUnit 3.13.3 -> 3.14.0 (5.0.0 backed off, breaks Assert.ThrowsAsync usage)
- NUnit3TestAdapter 5.0.0 -> 5.2.0 (kept on 5.x to match NUnit 3)
- Serilog 4.2.0 -> 4.4.0
- Serilog.Extensions.Logging 9.0.1 -> 10.0.0
- System.Diagnostics.PerformanceCounter 6.0.1 -> 10.0.12
- System.ValueTuple 4.6.1 -> 4.6.2 (Halibut.TestUtils.Contracts)
- Testcontainers 4.0.0 -> 4.16.0
- Octopus.Shellfish 0.2.2426 -> 0.2.3062 (Halibut.Tests.DotMemory)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Assent 3.x only supports net8.0+, which broke net48 restore (NU1202).
  Pin to 1.9.3, the newest version with a net48-compatible build.
- System.IO.Pipelines 6.0.3 is a downgrade on net48 now that
  Microsoft.Extensions.Hosting 10 / Testcontainers pull in newer
  versions (NU1605 as error). Bump to 10.0.12.
- Remove the explicit SSH.NET reference; Testcontainers 4.16 already
  depends on SSH.NET 2026.0.0.
- Upgrade Octopus.OctoVersion.Tool to 1.1.79 and run its net10.0 build.
  0.3.400 only ships net8.0 with no roll-forward, so it fails on CI
  agents that only have the .NET 10 runtime.
- ExceptionContractFixture: accept the modern .NET SslStream EOF message,
  which has no leading space (only .NET Framework's does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@borland
borland requested a review from a team as a code owner October 9, 2026 01:49
@borland

borland commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Opus review

An automated code review by Claude Opus 5.5 has been carried out on this branch. Most of the migration was done by a smaller model, so the review was deliberately skeptical.

What it checked

  • Every csproj/TFM/condition change, including correctness of the net48 target. It restored and built net48 locally in a scratch worktree to verify, not just by reasoning.
  • That every bumped test package still supports net48
  • The AsyncEnumerableCompat helper, SYSLIB pragmas, and WebSocketStream qualification
  • Nuke 10 API changes in Build.cs, the OctoVersion tool, build.sh/build.ps1, and the regenerated build.schema.json
  • The packed nuspec dependency groups for net48 and net10.0, compared with before
  • The Testcontainers code change, the 55/57 compressed-size split, and the flaky EOF assertion

What it found and fixed (commit bbcf21a)

  • 🔴 Assent 3.x dropped net48, so net48 restore failed (NU1202). Pinned to 1.9.3.
  • 🔴 System.IO.Pipelines 6.0.3 caused a NU1605 downgrade error on net48. Bumped to 10.0.12.
  • 🔴 OctoVersion 0.3.400 only runs on .NET 8 and would fail on a .NET 10-only CI agent. Upgraded to 1.1.79 (net10.0).
  • 🟡 Removed a redundant direct SSH.NET reference (Testcontainers already brings the same version)
  • 🟡 Fixed a pre-existing flaky EOF exception-message assertion (.NET Core's message has no leading space)

Notes (not changed)

  • The net48 NuGet dependency group is identical to before. net10.0 only drops in-box packages.
  • .NET 10's System.Net.WebSockets.WebSocketStream is ambiguous with Halibut's public WebSocketStream for consumers who import both namespaces.
  • Microsoft.Bcl.AsyncInterfaces and System.IO.FileSystem.AccessControl are now redundant on net10.0 but harmless. Left alone to avoid touching runtime dependencies.

Verification: builds with 0 warnings on net10.0 and net48, ./build.sh --target CompileNet80 passes, and 1020/1022 net10.0 tests pass on macOS. The 2 failures are a known macOS-only failure that also happens on main. net48 tests need Windows CI.

Verdict: ✅ Approve with notes. Recommend confirming that the Windows net48 test run passes in CI before merging.

🤖 Generated with Claude Code

@LukeButters
LukeButters enabled auto-merge (squash) October 9, 2026 02:01
@LukeButters
LukeButters disabled auto-merge October 9, 2026 02:01
@LukeButters
LukeButters enabled auto-merge (squash) October 9, 2026 02:01
borland and others added 2 commits October 9, 2026 15:05
- global.json SDK 10.0.100 -> 10.0.401
- NuGet.Packaging 6.12.1 -> 6.14.3 (GHSA-g4vj-cjjj-v7hg)
- System.Security.Cryptography.Xml 9.0.0 -> 10.0.12 (GHSA-23rf-6693-g89p)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LukeButters
LukeButters merged commit 62ba4bc into main Oct 9, 2026
13 checks passed
@LukeButters
LukeButters deleted the orion/build-net10 branch October 9, 2026 02:49
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.

2 participants