Skip to content

chore: target net11.0 beside net10.0 and build with SDK 11 - #6

Merged
solrevdev merged 2 commits into
masterfrom
chore/add-net11
Nov 12, 2026
Merged

solrevdev merged 2 commits into
masterfrom
chore/add-net11

Conversation

@solrevdev

@solrevdev solrevdev commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

John Smith answered on 12 November 2026:

solrevdev.bbx joins in: yes. Add net11.0 beside net10.0 and move its global.json so SDK 11 builds it.

bbx already runs on .NET 11 through RollForward Major. This change is for consistency.

SDK policy

.NET 10 is the LTS and the baseline. A machine with only SDK 11 builds and works. A machine with SDK 10 and 11 uses 11. A machine with only SDK 10 still builds and works.

global.json:

{ "sdk": { "version": "10.0.100", "rollForward": "latestMajor", "allowPrerelease": false } }

latestMajor picks the newest installed release SDK, starting from 10.0.100.

Conditional target

Both projects use:

<TargetFrameworks>net10.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '11.0'))">net10.0;net11.0</TargetFrameworks>

SDK 11 or later builds both targets. SDK 10 alone builds net10.0 only. The published package needs both.

CI

The setup-dotnet steps list 10.0.x and 11.0.x and no longer use global-json-file. Under latestMajor, setup-dotnet v5 drops the global.json version and installs nothing from it (getVersionFromGlobalJson sets the version to ''). CI then builds with SDK 11, and runtime 10 runs the net10.0 tests. A new "Check package targets" step after Pack fails the run if the nupkg lacks tools/net10.0 or tools/net11.0. PR validation also runs when global.json changes.

Other changes

  • Version goes from 1.4.4 to 1.5.0. The publish workflow ships an untagged csproj version as-is.
  • RollForward stays Major. Package dependency versions are unchanged.
  • README build steps, AGENTS.md (commands and SDK policy), scripts/smoke.sh comment and the 1.5.0 CHANGELOG entry.

Proof (local; SDKs 10.0.404 and 11.0.100, runtimes 10.0.15 and 11.0.0)

(a) Normal run. dotnet --version gives 11.0.100. Both targets build with 0 warnings and 0 errors.

dotnet test -c Release -f net10.0
Passed!  - Failed:     0, Passed:   457, Skipped:     0, Total:   457 - Bbx.Tests.dll (net10.0)
dotnet test -c Release -f net11.0
Passed!  - Failed:     0, Passed:   457, Skipped:     0, Total:   457 - Bbx.Tests.dll (net11.0)

unzip -l solrevdev.bbx.1.5.0.nupkg
  tools/net10.0/any/DotnetToolSettings.xml
  tools/net10.0/any/bbx.dll
  tools/net11.0/any/DotnetToolSettings.xml
  tools/net11.0/any/bbx.dll

(b) SDK 10 only. A scratch worktree with global.json set to 10.0.404 and rollForward: disable. That pin was never committed. dotnet --version gives 10.0.404. Only net10.0 builds, with 0 warnings and 0 errors.

dotnet test -c Release
Passed!  - Failed:     0, Passed:   457, Skipped:     0, Total:   457 - Bbx.Tests.dll (net10.0)

unzip -l solrevdev.bbx.1.5.0.nupkg
  tools/net10.0/any/DotnetToolSettings.xml
  tools/net10.0/any/bbx.dll

<scratch>/tools/bbx --version
1.5.0+b6155cf6a55e24d5ee06e628d14da9c1b1842061

(c) Install the package from (a) into a scratch tool path (not the global tool):

Tool 'solrevdev.bbx' (version '1.5.0') was successfully installed.
<scratch>/tools/bbx --version
1.5.0+b6155cf6a55e24d5ee06e628d14da9c1b1842061
installed tools/: net10.0 net11.0

Merging

A merge to master changes src/Bbx/**, so the publish workflow will push 1.5.0 to NuGet, tag v1.5.0 and create a GitHub release. Merging is John's call.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Mjr3bTLWVmY8sc2j5bcqH

solrevdev and others added 2 commits November 12, 2026 11:14
The owner asked for net11.0 beside net10.0 and for global.json to move so
SDK 11 builds the tool. bbx already ran on .NET 11 through RollForward
Major, so this is for consistency. RollForward stays Major.

global.json pins 11.0.100 with rollForward latestFeature, so later 11.0
feature bands build it without jumping to a new major. setup-dotnet also
reads latestFeature as 11.0.x and installs the newest 11.0 SDK. CI now
installs 10.0.x as well, because the net10.0 tests need the .NET 10
runtime. global.json changes now trigger PR validation.

Version goes to 1.5.0 by hand, which the publish workflow ships as-is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Mjr3bTLWVmY8sc2j5bcqH
John wants .NET 10 as the LTS baseline: a machine with only SDK 10 must
still build, one with only SDK 11 must build, and one with both must use
11. global.json now asks for 10.0.100 with rollForward latestMajor and no
prereleases, so the newest release SDK wins.

net11.0 is added only when the SDK is 11 or later, because SDK 10 cannot
build it. The published package must carry both targets, so CI lists
SDKs 10.0.x and 11.0.x instead of reading global.json: under latestMajor
setup-dotnet v5 installs nothing from global-json-file. A new step fails
the run if the package lacks either tools/ folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Mjr3bTLWVmY8sc2j5bcqH
@solrevdev
solrevdev merged commit c7231b9 into master Nov 12, 2026
2 checks passed
@solrevdev
solrevdev deleted the chore/add-net11 branch November 12, 2026 11:35
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