Skip to content

Upgrade to .NET 10.0 (from .NET 8.0) - #249

Merged
JSv4 merged 1 commit into
mainfrom
claude/dotnet-8-to-10-upgrade-iizazh
Jul 3, 2026
Merged

JSv4 merged 1 commit into
mainfrom
claude/dotnet-8-to-10-upgrade-iizazh

Conversation

@JSv4

@JSv4 JSv4 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

.NET 8 reaches end-of-support in November 2026, so this upgrades the whole stack to .NET 10.0:

  • TargetFramework bumped to net10.0 across the core library, tests, all CLI tools (redline/docx2html/docx2oc/docxodus-pyhost), the diffharness tool, and the WASM bridge (wasm/DocxodusWasm).
  • global.json now pins SDK 10.0.0.
  • CI workflows (ci.yml, playwright.yml, publish.yml, python-publish.yml) now provision the .NET 10 SDK.
  • scripts/build-wasm.sh and the Python host's dev-fallback discovery path updated for the new net10.0 output directory.
  • .NET-version references refreshed in CLAUDE.md, README.md, python/README.md, and CHANGELOG.md.

The TFM bump itself was almost entirely mechanical — the library, tests, CLI tools, and WASM/AOT toolchain all built cleanly on the first pass with zero source changes, and the full xUnit suite matches the .NET 8 baseline exactly.

A real regression found and fixed

One genuine bug surfaced during the upgrade, isolated to the npm WASM bridge's Web Worker path: the .NET 10 WASM runtime hangs indefinitely when initialized inside a dedicated Worker that has already registered a message handler via the self.onmessage = ... property form. This is an upstream, open regression from .NET 8 (dotnet/runtime#114918) — dotnet.js's asset loader mis-detects the worker environment and never resolves its asset-loading promises, so dotnet.create()/getAssemblyExports() hang with no error.

npm/src/docxodus.worker.ts registered its handler with self.onmessage = ... before calling into WASM init, hitting this exactly. Fixed by switching to self.addEventListener("message", ...), which doesn't set the onmessage property and sidesteps the bug — behavior is otherwise identical.

Verified with a byte-for-byte .NET 8 vs .NET 10 WASM bundle comparison in an isolated worktree: the .NET 8 build initialized a Worker in ~485ms, the unpatched .NET 10 build hung indefinitely (60s timeout), and the patched .NET 10 build initializes in ~520ms.

Test plan

  • dotnet build Docxodus.sln -c Release — 0 warnings, 0 errors (library, tests, all CLI tools, WASM bridge)
  • dotnet test Docxodus.Tests/Docxodus.Tests.csproj -c Release — 2468 passed, 0 failed, 3 skipped — identical to the .NET 8 baseline run in the same environment
  • scripts/build-wasm.sh — WASM/AOT publish succeeds end-to-end on the .NET 10 emscripten toolchain
  • cd npm && npm run build && npx tsc --noEmit — clean
  • cd npm && npm test (Playwright, 231 tests across 36 spec files) — 231 passed, including the four worker-prepare.spec.ts tests and worker.spec.ts's worker-lifecycle tests that exercise the fixed code path

Generated by Claude Code

.NET 8 reaches end-of-support in November 2026. Bumps TargetFramework to
net10.0 across the core library, tests, all CLI tools (redline, docx2html,
docx2oc, docxodus-pyhost), the diffharness tool, and the WASM bridge;
global.json now pins SDK 10.0.0. CI workflows (ci.yml, playwright.yml,
publish.yml, python-publish.yml) provision the .NET 10 SDK.

The upgrade itself was almost entirely mechanical: the library, tests, CLI
tools, and WASM/AOT toolchain all built cleanly on the first pass, and the
full xUnit suite matches the .NET 8 baseline exactly (2468 passed, 0 failed,
3 skipped).

One real regression surfaced in the npm WASM bridge: the .NET 10 WASM
runtime hangs indefinitely when initialized inside a dedicated Web Worker
that has already registered a message handler via the `self.onmessage =`
property form (dotnet/runtime#114918, a regression from .NET 8's runtime).
docxodus.worker.ts hit this exactly, since it assigns its handler that way
before init. Fixed by switching to `self.addEventListener("message", ...)`,
which doesn't set the `onmessage` property and avoids the runtime's buggy
worker-environment detection. Verified against a byte-for-byte .NET 8 vs
.NET 10 WASM bundle comparison: .NET 8 initialized a worker in ~485ms, the
unpatched .NET 10 build hung indefinitely, and the patched build initializes
in ~520ms. Full Playwright suite (231 tests, including the four
worker-prepare.spec.ts tests and worker.spec.ts that exercise this path)
now passes end-to-end.

Also updates scripts/build-wasm.sh and the Python host's dev-fallback path
for the new net10.0 output directory, and refreshes .NET-version references
in CLAUDE.md/README.md/python/README.md and the CHANGELOG.
@JSv4
JSv4 merged commit 9947764 into main Jul 3, 2026
12 checks passed
@JSv4
JSv4 deleted the claude/dotnet-8-to-10-upgrade-iizazh branch July 3, 2026 19:31
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