When to use / when NOT to use
- •Use to standardize SDK versions and avoid local/CI drift.
- •Do not use for package-version upgrades (use package workflow skill).
Preconditions (tools, versions, repo state)
- •
dotnetCLI installed. - •Repo contains .NET files (
*.sln,*.csproj, or props files). - •Clean git state before
--execute.
Workflow (DISCOVER → PLAN → EXECUTE → VERIFY → REPORT)
- •DISCOVER: inspect SDK pinning and CI hints.
- •PLAN: define target SDK and expected impact.
- •EXECUTE: update/create
global.jsonfor target SDK. - •VERIFY: run restore/build/test.
- •REPORT: summarize alignment status and remaining CI actions.
Exact commands and expected signals
bash
skills/dotnet-sdk-align/scripts/run.sh --dry-run skills/dotnet-sdk-align/scripts/run.sh --execute --sdk=8.0.204 --ci skills/dotnet-sdk-align/scripts/run.sh --verify-only --ci
Success: global.json reflects target SDK (execute) and restore/build/test complete.
Failure: missing dotnet, dirty tree, or omitted --sdk in execute mode.
If it fails (checklist)
- •Install required .NET SDK locally.
- •Verify SDK version exists (
dotnet --list-sdks). - •Reconcile CI image/toolset with selected SDK.
Final report template
- •Current vs target SDK.
- •Files touched (
global.json, CI references). - •Restore/build/test results.
- •CI changes needed.
- •Rollback command.