Skip to content

Build on a named SDK, and keep the .NET 8 runtime for the net8.0 tests - #64

Merged
ivanvyd merged 1 commit into
mainfrom
chore/pin-sdk
Aug 14, 2026
Merged

Build on a named SDK, and keep the .NET 8 runtime for the net8.0 tests#64
ivanvyd merged 1 commit into
mainfrom
chore/pin-sdk

Conversation

@ivanvyd

@ivanvyd ivanvyd commented Aug 14, 2026

Copy link
Copy Markdown
Owner

This repository commits packages.lock.json and restores with --locked-mode, but setup-dotnet took 10.0.x — whatever the runner had that day. Those two settings disagree: a lock file is a claim about what restore resolves, and the SDK is one of the inputs that decides it.

LakeWright.NET went red this week on exactly that, when its runner crossed a feature band and Microsoft.AspNetCore.App.Internal.Assets moved with it, failing NU1004 against a lock file nobody had touched.

This repository is not exposed to that package today — its Web samples target net8.0, where the Web SDK does not add it. So this fixes the class while it is cheap, rather than after an instance.

The part that needed care

The 8.0.x line stays. It is not there to choose the SDK — it is there so the net8.0 half of the test matrix has a runtime to run on, and pinning the build SDK does not provide that. Each job now installs 8.0.x and the SDK named in global.json. Dropping it would have been the easy way to break the tests quietly.

Verified locally on 10.0.303: restore --locked-mode and build -c Release both exit 0 across net8.0 and net10.0.

This repository commits packages.lock.json and restores with --locked-mode, but
`setup-dotnet` took `10.0.x` -- whatever the runner had that day. Those two
settings disagree: a lock file is a claim about what restore resolves, and the
SDK is one of the inputs that decides it.

LakeWright.NET went red this week on exactly that, when its runner crossed a
feature band and `Microsoft.AspNetCore.App.Internal.Assets` moved with it. This
repository is not exposed to that package today -- its Web samples target net8.0,
where the Web SDK does not add it -- so this is fixing the class while it is
cheap rather than after an instance.

The `8.0.x` line stays. It is not there to choose the SDK; it is there so the
net8.0 half of the test matrix has a runtime to run on, and pinning the build SDK
does not provide that. So each job now installs 8.0.x *and* the SDK named in
global.json.

Verified on a local 10.0.303: restore --locked-mode and build -c Release both
exit 0 across net8.0 and net10.0.
@ivanvyd
ivanvyd merged commit 334b149 into main Aug 14, 2026
8 checks passed
@ivanvyd
ivanvyd deleted the chore/pin-sdk branch August 14, 2026 06:11
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