Skip to content

build: target net10.0 and net11.0 on SDK 11 - #579

Merged
Tim81 merged 14 commits into
mainfrom
build/net11-multitarget
Nov 18, 2026
Merged

Tim81 merged 14 commits into
mainfrom
build/net11-multitarget

Conversation

@Tim81

@Tim81 Tim81 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Moves the repository to the .NET 11 SDK and multi-targets every project for net10.0 and net11.0.
Both runtimes reach end of support on 2028-11-14. This supersedes #573 (the SDK-only bump).

  • global.json pins SDK 11.0.100 (latest patch); Directory.Build.props sets TargetFrameworks to
    net10.0;net11.0 and pins LangVersion to 14 (latest follows the SDK and compiled both
    frameworks as C# 15 on SDK 11.0.100).
  • VellumPdf.Signing takes System.Security.Cryptography.Pkcs 10.0.14 on net10.0 and 11.0.0 on
    net11.0. A Pack-time CI check fails if the net10.0 group ever names a non-10.x version.
  • The seven library nupkgs carry lib/net10.0 and lib/net11.0; the VellumPdf.Cli tool package
    carries tools/net10.0/any and tools/net11.0/any; snupkgs are produced for all eight.
  • CI gates run per target framework: coverage reports are attributed through
    --results-directory-layout per-module (14 expected reports, one per project and framework), the
    oracle floors are checked per framework, and the 84% threshold applies to each framework and to the
    merge. The oracle log is named <base>.<tfm>.<pid>.
  • eng/aot/run-aot-smoke.ps1 publishes both frameworks. The benchmark harness stays on net10.0.
  • dotnet pack failed with NU5039 on a multi-targeted project (the None Update for the README
    matches nothing in the outer build). src/Directory.Build.targets now removes and re-includes it.
    The failure existed only on this branch; origin/main packs.
  • The native vellum-preflight binary is published from net10.0 (release.yml gets -f net10.0;
    a multi-targeted Exe without -f fails with NETSDK1129). release.yml cannot be exercised
    without a tag; the same command was run locally for win-x64.

Maintainer decisions needed

  1. Native CLI binary from net10.0 (LTS). Alternative is net11.0.
  2. Support-policy sentence. README and CHANGELOG now say "VellumPdf keeps both targets until
    2028-11-14". That is a commitment, not a measurement; confirm or reword it.
  3. Close chore(deps): Bump dotnet-sdk from 10.0.403 to 11.0.100 #573 when this merges.
  4. Timeout and oracle floors are final, set from the first CI run (below). The maintainer chose
    to keep timeout-minutes: 60.

What the figures below are

Every test figure is a local Windows measurement taken on 2026-11-18: Release, SDK 11.0.100, dotnet test VellumPdf.slnx -c Release --no-build --max-parallel-test-modules 2 --results-directory-layout per-module -- --coverlet, process priority BelowNormal, REQUIRE_ORACLES=1, veraPDF 1.30.2, qpdf
12.4.1, poppler from MSYS2. Nothing here was measured on the Linux CI runner.

  • 14,214 tests in total, 2 x (7,095 passed + 12 skipped): 14,190 passed, 0 failed, 24 skipped
    (12 per framework, all in Reader.Tests' xref-reconstruction damage tests: each skips by its own
    logic when a damage mode cannot apply to a fixture, such as a 3-digit startxref too short for M1
    or a truncation that leaves an earlier revision intact; none is a missing oracle). Wall time
    13m56s.
  • Passed per project, identical on both frameworks: Cli 908, TestSupport 17, Layout 412,
    Barcodes 1051, Conformance 1325, Kernel 1525, Reader 1857 (plus the 12 skipped).
  • All .verified snapshots, including the byte-level PDF goldens, passed on net11.0 with no
    per-framework snapshot files.
  • The PaginationDepthTests stack-depth probes fail on both frameworks when PlaceRenderer's
    Partial branch is mutated to recurse (Actual: 201). That mutation is an approximation of the
    fix(layout): loop instead of recursing, so deep documents render #461 revert, which no longer applies cleanly.
  • AOT smoke passed for net10.0 and net11.0 on win-x64.
  • Coverage: 91.7% per framework, 91.3% merged over 42,628 lines. vellum-preflight is the only
    assembly whose valid-line count differs by framework (3092 on net10.0, 2640 on net11.0, 4971
    merged) because the JSON source generator writes under obj/Release/<tfm>/; its merged rate
    (83.0%) falls between the per-framework rates (84.0%, 81.3%).
  • Oracle invocations, identical per framework: verapdf 311, pdftoppm 135, python 137, qpdf 57,
    pdftotext 8, pdfsig 2. The first CI run (ubuntu-24.04) logged the same counts under both
    frameworks. The floors are 90% of those, rounded down: 279 / 121 / 123 / 51 / 7 / 1. Only verapdf
    (was 273) and qpdf (was 36, 63% of 57) changed.

Not yet measured

  • The coverage gate and the new Pack check passed their first CI run ("Coverage gate passed.",
    91.3% merged; Pack check step success), but only on the unmutated tree. The mutations below ran
    locally: the gate
    passed on a real coverage directory and failed on each of: a deleted report, an emptied report, a
    report truncated to one package, a stray flat report, and one framework with half its hits
    zeroed (net11.0 at 66.0%, net10.0 at 91.7%), and both frameworks at 66% (all three errors print in
    one run). The mutation that separates the new per-framework threshold from the old gate: net11.0
    lines with number % 8 == 0 zeroed gives net11.0 80.3%, which fails the per-framework threshold,
    while the merged figure is 90.9% and the previous gate passed. The Pack check passes on the real Signing nuspec
    (10.0.14 / 11.0.0) and fails with the net10.0 entry set to 11.0.0.
  • Dependabot's handling of two conditional Pkcs entries has not been observed. The first Pkcs PR
    needs reading against Directory.Packages.props before merging.
  • Do not merge before Tests: wall-clock assertions flake on the shared CI runner #400 is fixed: main's CI is red on that wall-clock flake.

Test plan

  • Release build, 0 warnings, both frameworks
  • Full Release suite on both frameworks with oracles required (local Windows)
  • dotnet format --verify-no-changes, clean-room check
  • AOT smoke, both frameworks; win-x64 CLI publish with -f net10.0
  • dotnet pack, nupkg and snupkg listings
  • First CI run (7428f28): Test step 23m22s, build job 29m0s, Linux oracle counts, coverage gate,
    Pack check

Tim81 added 12 commits November 18, 2026 02:12
.NET 11 is GA and both runtimes reach end of support on the same day, so
the libraries ship for both rather than moving the floor. A project that
sets TargetFramework itself under a props file that sets TargetFrameworks
builds only one, so the root property is replaced rather than extended.

The AOT smoke harness publishes both TFMs (a multi-targeted Exe needs -f
or fails with NETSDK1129). The benchmark harness stays on net10.0 so its
numbers remain comparable across history.
The 11.0.0 package's net10.0 group pulls System.Formats.Asn1 11.0.0 into
a net10.0 consumer, while its net11.0 group takes no dependency. Keep the
net10.0 build on the 10.0.14 pin and give net11.0 the 11.0.0 package.
Both commands now meet a multi-targeted project. dotnet publish of a
multi-targeted Exe without -f fails with NETSDK1129, and the fuzz job
would otherwise run the same parser inputs twice inside a 180-minute
budget. The fuzz job also names the net10.0 runtime explicitly, because
the 11.0 SDK that global.json pins does not carry it. Dependabot is told
not to propose Pkcs 11 for the net10.0 line, and the docs build says why
docfx stays on net10.0.
Each test project now runs once per target framework, so the per-process
log name gains the framework (<base>.<tfm>.<pid>). The label comes from
AppContext.TargetFrameworkName, the framework the test executable was
built for, not Environment.Version, which is the runtime after
roll-forward. That lets the CI floor step fail a framework whose runs
logged nothing instead of passing on the other framework's files.
The suite now runs on net10.0 and net11.0. The Test step uses
--results-directory-layout per-module so every report lands in
<project>/<tfm>_<arch>/; coverlet.MTP names reports only by write
timestamp, so the flat layout cannot say which run produced a file.

The coverage gate walks the expected 7 projects x 2 frameworks and
requires exactly one report in each, fails on any report elsewhere
(which is also what an ignored layout option looks like), checks each
report against the assemblies its project must instrument, then applies
the existing name, valid-line and floor checks per framework and on the
merge. The oracle floor step loops over both frameworks and counts a
framework with no log files as zero. The job timeout is raised to an
interim 60 minutes until a CI run measures the Test step, and the net10.0
runtime is requested explicitly.
Update the README, the package READMEs, the docs index, architecture
notes and CONTRIBUTING for the 11.0 SDK pin, the second target
framework, the .NET 10 runtime the net10.0 tests need, and the
per-module coverage command.
With two target frameworks, dotnet pack runs in the outer build, which
has no default-item globs, so None Update="README.md" matched nothing and
every package failed with NU5039. Remove-then-Include gives the same
result in the outer and inner evaluations. Verified by packing all eight
projects and listing each nupkg.
Covers the dual target, the Pkcs split, the native CLI binary staying on
net10.0, the per-framework CI gates, and the pack fix the second target
framework exposed.
LangVersion=latest follows the SDK: on SDK 11.0.100 it compiled both
target frameworks as C# 15 where SDK 10.0.404 gave 14.0. A feature that
needs no new runtime type would then compile for net10.0 and give
net10.0 consumers on SDK 10 a surface built for C# 15. The language
version now moves only by an explicit, reviewed change.
Apply the 84% threshold to each target framework as well as the merge,
so a drop confined to one framework is not averaged away. Add a Pack-time
check that the net10.0 group of the Signing nuspec names Pkcs 10.x, so a
tool rewriting both Directory.Packages.props entries cannot put the
11.0 package into a net10.0 consumer unnoticed. Correct comments that
overstated or mis-explained the merge, the fuzz budget, Dependabot's
behaviour and the log file name.
The Cli package ships under tools/, not lib/. State the support policy
and the restore rule precisely, record the C# 14 pin, fold the pack fix
into the Changed entry, and drop a process detail from the changelog.
The per-framework coverage threshold now appends to the collected
problems and the gate exits once, so a run that drops both frameworks
reports both and the merge instead of stopping at the first. The Pkcs
check parses the nuspec with ElementTree (namespace-aware), reports a
self-closing or missing group by its framework, and judges a NuGet range
by its lower bound. Comments that misdescribed the merge, the measured
figures and the oracle floors are corrected and the long lines this
branch added are wrapped.
The first CI run on both frameworks took 29 minutes, 23 of them in the
Test step, so 60 stays. It logged the same oracle counts under net10.0
and net11.0. The qpdf floor of 36 was 63% of the measured 57, so the
verapdf and qpdf floors are now 90% of 311 and 57 per the stated rule.
@Tim81
Tim81 merged commit 4eed439 into main Nov 18, 2026
4 checks passed
@Tim81
Tim81 deleted the build/net11-multitarget branch November 21, 2026 06:37
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