Auto-derive BootstrapSdkVersion from global.json so it can never lag tools.dotnet
Fixes #13693
eng/Versions.props's hard-coded bootstrap SDK version and global.json's tools.dotnet were maintained independently and could drift. When the bootstrap SDK lags tools.dotnet, its shared runtime ends up older than the building SDK delivers, causing host-resolution failures (You must install or update .NET to run this application).
Changes
eng/Versions.props— RenameBootstrapSdkVersion->BootstrapSdkVersionFloor: it is a minimum, not the literal version.eng/BootStrapMsBuild.props— Derive the effectiveBootstrapSdkVersion = Max(BootstrapSdkVersionFloor, $(NETCoreSdkVersion)), so the bootstrap SDK can never lagglobal.json, while a higher floor can still pin a newer SDK.eng/BootStrapMsBuild.targets— AddVerifyBootstrapRuntimeFloor: after the SDK is acquired, fail the build if none of the laid-downMicrosoft.NETCore.Appruntimes is at least$(BundledNETCoreAppPackageVersion)(the runtime the building SDK delivers).eng/cibuild_bootstrapped_msbuild.ps1/.sh— Resolve the version viadotnet msbuild -getProperty:BootstrapSdkVersiononMSBuild.Bootstrap.csprojinstead of parsingVersions.props, so stage 2 locatessdk/<version>/MSBuild.dllusing the effective value. Fail fast if it cannot be read.- Docs — Update
documentation/release-checklist.mdand.github/skills/release/SKILL.mdfor the rename.
Tests
src/Build.UnitTests/BootstrapRuntimeFloor_Tests.cs covers the guard: runtime equal/newer/older than the floor, multiple runtimes, prerelease-suffix handling, non-version directories, and absent/empty runtime root.
Hello @Copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.
/review
⚠️ Security scanning failed for Expert Code Review (command). Review the logs for details.
Performance review complete for PR #13694.
Design-level notes on PR #13694
🟡 Stale documentation — property rename not reflected
Two files still reference the old BootstrapSdkVersion property name (now BootstrapSdkVersionFloor in eng/Versions.props):
documentation/release-checklist.mdline 232:Update BootstrapSdkVersion in eng/Versions.props if a fresh SDK was released..github/skills/release/SKILL.mdline 119: table entry listsBootstrapSdkVersionineng/Versions.props
Both references will mislead the next release engineer (the property no longer exists under that name). They also need a guidance update: under the new model the floor only needs raising when pinning a newer SDK than global.json would naturally deliver — a different trigger condition than before.
🟡 Stale PR description
The description states:
eng/cibuild_bootstrapped_msbuild.sh— Usesjqwhen available for proper JSON path traversal (.tools.dotnet); falls back to grep/sed.
The actual implementation uses dotnet msbuild -getProperty:BootstrapSdkVersion — no jq and no global.json read. The description appears to be from an earlier iteration of the PR and should be corrected to avoid confusion during review or future bisection.
[!WARNING]
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
dnceng.pkgs.visualstudio.compkgs.dev.azure.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:network: allowed: - defaults - "dnceng.pkgs.visualstudio.com" - "pkgs.dev.azure.com"See Network Configuration for more information.
Generated by Expert Code Review (command) for issue #13694 · 2.9K AIC · ⊞ 29.8K ambient context · ◷ Comment /review to run again
🔍 Skill Validator Results
⚠️ Warnings or advisories found
| Scope | Checked |
|---|---|
| Skills | 1 |
| Agents | 0 |
| Total | 1 |
| Severity | Count |
| --- | ---: |
| ❌ Errors | 0 |
| ⚠️ Warnings | 2 |
| ℹ️ Advisories | 0 |
Summary
| Level | Finding |
|---|---|
| ℹ️ | Found 1 skill(s) |
| ℹ️ | [release] 📊 release: 2,904 BPE tokens [chars/4: 2,869] (standard ~), 12 sections, 0 code blocks |
| ℹ️ | [release] ⚠ Skill is 2,904 BPE tokens (chars/4 estimate: 2,869) — approaching "comprehensive" range where gains diminish. |
| ℹ️ | [release] ⚠ No code blocks — agents perform better with concrete snippets and commands. |
| ℹ️ | ✅ All checks passed (1 skill(s)) |
Full validator output
```text Found 1 skill(s) [release] 📊 release: 2,904 BPE tokens [chars/4: 2,869] (standard ~), 12 sections, 0 code blocks [release] ⚠ Skill is 2,904 BPE tokens (chars/4 estimate: 2,869) — approaching "comprehensive" range where gains diminish. [release] ⚠ No code blocks — agents perform better with concrete snippets and commands. ✅ All checks passed (1 skill(s)) ```
/review
⚠️ Security scanning failed for Expert Code Review (command). Review the logs for details.
Expert-reviewer subagent launched for PR #13694 (24 dimensions, parallel sub-agent batches). The subagent will post its own inline review comments and submit a final review verdict directly to the PR once complete.
@ViktorHofer @rainersigwald I converted this pr to ready, can you re-review it please?
We decided to change the approach and do not auto-derive bootstrapSdkVersion and only add the clear fail message if runtime versions of bootstrapSdk is older than runtime of sdk from global.json. See https://github.com/dotnet/msbuild/pull/14221