Repository navigation
build(net11): move the repo to net11 and keep net10 package reach - #147
Merged
Merged
Conversation
Move every project to net11.0 and pin SDK 11.0.100, while the published analyzer keeps reaching a net10.0 consumer from one netstandard2.0 build. - Directory.Build.props targets net11.0 and drops the dead preview-feature groups. The runtime-async switch moves to Directory.Build.targets, because the role markers are not set when a .props file evaluates. - Both analyzer projects pin LangVersion 14.0. The SDK 10 compiler must build the sources, and latest there is C# 14, so a C# 15 form fails CS8652 before the package loads. - tests/Net10Consumer is a new fixture with its own global.json, props, and nuget.config. It carries one deliberate E128024 violation, so the new net10-consumer CI job asserts the packaged analyzer loaded and reported. - The analyzer test project no longer multi-targets. The repository builds and tests on net11.0 only. - E128.Analyzers 2.7.0 states the net10 and net11 host reach in its package metadata and tags. - Microsoft.Extensions packages and Mvc.Testing move to 11.0.0. Unused pins for System.Collections.Immutable, Humanizer.Core, Microsoft.ApplicationInsights, and Microsoft.Extensions.Diagnostics.Testing are removed. - E128.Reference.Core returns GreetingResult, a C# 15 union of Greeting and GreetingError, and the web endpoint maps each case. - Containers move to 11.0-resolute. CI and publish move to 11.0.x. - runtime-matrix.sh collects every TFM declaration and no longer trips on an empty array. solution-inventory.sh counts benchmarks. podman.sh reads the plain health body. test.sh gains --framework. - Lode records the net11 practices. The net11-upgrade plan closes. Co-Authored-By: Claude Code Co-Authored-By: Claude
The root .globalconfig escalates every analyzer diagnostic to error, so the deliberate E128024 probe failed the fixture build instead of reporting. The net10-consumer job then stopped before its gate could run. Add a fixture-local .globalconfig at global_level 102 that sets the analyzer default severity to warning. The probe still appears in the build log, the build exits 0, and any real compile error or analyzer load failure still fails the job. Verified with SDK 10.0.404: dotnet msbuild -t:Rebuild reports one warning E128024 and exits 0. Co-Authored-By: Claude Code Co-Authored-By: Claude
The previous attempt lowered the analyzer default severity so the fixture's deliberate E128024 violation would warn instead of fail. That weakened the rule and still failed, because the gate read net10-consumer.log from the repository root while the build wrote it inside tests/Net10Consumer. E128024 stays at error severity. The fixture source now carries XML doc comments, so it compiles cleanly under the repository analyzer rules. The proof moves to the analyzer report. The CI build passes ReportAnalyzer=true with detailed verbosity, and the report lists every rule that executed. The job fails when the report omits E128024 or when the log carries a load warning. The log now writes to the repository root, where the gate reads it. Co-Authored-By: Claude Code Co-Authored-By: Claude
A _ arm accepts any case type added later, so the compiler stops warning about a missing case. The null arm names the empty case and keeps the check. Delete the Match wrapper, which only invoked its argument, and inline the switch at each call site. SS019 demands a default label, which a union switch must not have, so the two files that switch over a union take a scoped none row in .editorconfig. Co-Authored-By: Claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executive Summary
The repository built and tested on
net10.0and SDK10.0.4xx. The published analyzer package must keep working for anet10.0consumer while the repository itself moves to .NET 11.This change moves every project to
net11.0and pins SDK11.0.100. It leaves the analyzer assemblies onnetstandard2.0with no package dependency, so one build loads in a .NET 10 host and a .NET 11 host. A new fixture proves that reach by consuming the packed package under SDK 10.The gate is green: shell lint, format, build, and test all pass. The suite reports 5,270 tests passed, 0 failed, 0 skipped, with 0 build warnings and 0 build errors. The
net10.0consumer proof is behavioral, not a measurement: the packaged analyzer reportsE128024in anet10.0build.Code Changes
Build and SDK
global.jsonpins SDK11.0.100andDirectory.Build.propstargetsnet11.0.EnablePreviewFeaturesgroups are removed. Union types and runtime async are GA.runtime-async=ongroup moves toDirectory.Build.targets. A.propsfile evaluates before the project body setsIsTestProject,IsRoslynComponent, orIsBenchmarkProject, so the role conditions read empty there.tests/E128.Analyzers.Testsno longer multi-targets.Analyzer reach
LangVersionto14.0. The SDK 10 compiler must build the sources, andlatestthere is C# 14. A C# 15 form in analyzer source failsCS8652before the package can load.E128.Analyzersversion2.7.0states the two-host reach in its description and tags.tests/Net10Consumeris a new fixture. It carries its ownglobal.json(SDK 10), emptyDirectory.Build.propsand.targetsso no repository analyzer reaches it, an emptyDirectory.Packages.propsto stop central package management, and anuget.configthat clears the inherited sources and servesE128.*fromartifacts/nupkgs. Its source holds one deliberateE128024violation.Application code
E128.Reference.CorereturnsGreetingResult, a C# 15unionofGreetingandGreetingError. The web endpoint maps each case and returns 400 for a blank name.Dependencies
Microsoft.Extensions.*andMvc.Testingmove to11.0.0.System.Collections.Immutable,Humanizer.Core,Microsoft.ApplicationInsights, andMicrosoft.Extensions.Diagnostics.Testing.System.Security.Cryptography.Pkcsstays at11.0.0. Removing the pin let a9.0.6transitive version through, which carries a high-severity advisory.Infrastructure
Dockerfilemoves to11.0-resolute.ci.ymlandpublish.ymlmove to11.0.x.ci.ymlgains thenet10-consumerjob. It installs both SDK bands, packs the analyzer, builds the fixture, then fails when the log showsCS8032,AD0001, or a load failure, or whenE128024is absent.runtime-matrix.shnow collects every TFM declaration and no longer exits on an empty array underset -u.solution-inventory.shcounts benchmark projects.podman.shreads the plainHealthybody instead of JSON.test.shgains--framework.Documentation
lode/dotnet/net11-upgrade.mdrecords the two-band rule, the analyzer reach rules, the union result, and the formatting hazard.plans/roadmap.mdrecords the deferred items.Tests and Tooling
scripts/check.sh --all: shell, format, build, and test all pass.scripts/format.sh --checkreports no finding.analyzer-release-check.sh --jsonreportsclean, with 214 source rules, 0 unshipped, 215 shipped.readme-table-diff.sh --analyzer --jsonreportsdrift: false.net10-consumerCI job is new, so this run is its first use.Review Guide
Directory.Build.targets: the runtime-async condition depends on properties set in the project body, which is why it lives in.targetsand not.props.src/E128.Analyzers/E128.Analyzers.csprojandsrc/E128.Analyzers.CodeFixers/E128.Analyzers.CodeFixers.csproj: theLangVersionpin at14.0is deliberate. Changing it tolatestbreaks the SDK 10 build of the sources.tests/Net10Consumer/: check that the fixture'sDirectory.Build.props,Directory.Packages.props, andnuget.configreally cut the repository inheritance. The fixture only proves reach if it builds without the repository's own analyzer and package settings..github/workflows/ci.yml: thenet10-consumergate asserts a diagnostic and the absence of a load warning. Both halves are needed, because a silent analyzer and a loaded analyzer look the same by exit code.Rollback
Revert the single commit. The branch carries one commit on top of current
main, and no other branch depends on it.The previous
.NET 10state is themaintip before this commit.Links
plans/roadmap.md, section ".NET 11 Follow-Up".plans/net11-upgrade/, recoverable from commit2d1d3c1on this branch's ancestor history.origin/feature/net11-upgrade, holds plan documents from 2026-11-06 that exist nowhere else. This pull request does not touch that branch.🤖 Generated with Claude Code