setup-local-sdk
Install a .NET SDK locally for safe preview testing, specific-version pinning, or reproducible team setups — without modifying the system-wide installation. USE FOR: trying .NET previews safely, testing specific SDK versions, installing MAUI or other workloads on a preview, updating or replacing an existing local SDK, creating reproducible team/CI install scripts, configuring global.json paths. DO NOT USE FOR: system-wide SDK installs, .NET hosts older than 10, runtime-only installs, or projects not using SDK-style commands.
npx skills add dotnet/skills --skill setup-local-sdk --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# setup-local-sdk ## Purpose Guide the user through installing a .NET SDK into a project-local `.dotnet/` directory and wiring it up via the `global.json` `paths` feature (.NET 10+). The examples use .NET 11, but this works with any version — prerelease or stable. The result is a fully isolated SDK that: - Does **not** modify the system-wide .NET installation. - Is picked up automatically by `dotnet` commands from the project root. - Can be deleted to revert (`rm -rf .dotnet/` or `Remove-Item -Recurse -Force .\.dotnet`). ## When NOT to use - User wants a **system-wide** install — direct to the official installer. - Host `dotnet` is **older than v10** — `paths` doesn't exist; explain and stop. - User needs a **runtime-only** install — `paths` applies to SDK resolution only. ## Inputs / Prerequisites | Input | Required | Default | Notes | |---|---|---|---| | Channel or version | No | `11.0` | e.g. `11.0`, `STS`, `LTS`, or an exact version like `11.0.100-preview.2.26159.112` | | Quality | No | `preview` | One of: `daily`, `preview`, `ga` | | jq | No | — | Optional for bash team scripts when patching an existing `global.json`; without it, do not overwrite the file | ### Prerequisites 1
- Purpose
- When NOT to use
- Inputs / Prerequisites
- Prerequisites
- Workflow
- Step 1 — Clarify what to install
- Step 2 — Verify .NET 10+ host
- Step 3 — Detect operating system
- Step 4 — Check for existing local SDK
- Step 5 — Download and run the install script
- Step 6 — Identify the installed version
- Step 7 — Create or update global.json
- Step 8 — Update .gitignore
- Step 9 — Install workloads (if requested)
dotnet --version test -d .dotnet && echo "exists" || echo "not found" trap 'rm -f "$INSTALL_SCRIPT"' EXIT curl -fsSL https://dot.net/v1/dotnet-install.sh -o "$INSTALL_SCRIPT" bash "$INSTALL_SCRIPT" --channel <CHANNEL> --quality <QUALITY> --install-dir .dotnet grep -qxF '.dotnet/' .gitignore 2>/dev/null || printf '\n.dotnet/\n' >> .gitignore set -euo pipefail rm -f "$INSTALL_SCRIPT" trap cleanup EXIT if [ -n "$VERSION" ]; then
What does the setup-local-sdk skill do?
Install a .NET SDK locally for safe preview testing, specific-version pinning, or reproducible team setups — without modifying the system-wide installation. USE FOR: trying .NET previews safely, testing specific SDK versions, installing MAUI or other workloads on a preview, updating or replacing an existing local SDK, creating reproducible team/CI install scripts, configuring global.json paths. DO NOT USE FOR: system-wide SDK installs, .NET hosts older than 10, runtime-only installs, or projects not using SDK-style commands.
How do I install it?
Run `npx skills add dotnet/skills --skill setup-local-sdk --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.