setup-local-sdk

Installs a project-local .NET SDK and configures global.json paths for isolated version resolution.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/adinj00/player-performance --skill setup-local-sdk-adinj00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-local-sdk
Source: https://github.com/adinj00/player-performance/tree/main/.agents/skills/setup-local-sdk
Command: npx skills add https://github.com/adinj00/player-performance --skill setup-local-sdk-adinj00

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing .NET preview releases or pinning specific SDK versions normally risks breaking the system-wide installation. This Skill installs a .NET SDK into a project-local .dotnet/ directory and wires it up through the global.json paths feature (.NET 10+), so the isolated SDK is picked up automatically without touching the global install. ## Core Features & Use Cases - Isolated SDK Installation: Downloads and installs any .NET SDK channel, quality, or exact version into .dotnet/ using Microsoft's official dotnet-install scripts on macOS, Linux, and Windows. - global.json Configuration: Creates or safely merges global.json with paths, rollForward, allowPrerelease, and errorMessage settings, backing up existing files and preserving unrelated properties. - Workload & Team Script Support: Installs workloads like MAUI using the local dotnet binary and generates reproducible install-dotnet.sh / install-dotnet.ps1 scripts for team and CI setups. - Use Case: You want to try the latest .NET 11 preview with MAUI workloads on a project without affecting your stable system SDK. The Skill installs the preview locally, configures global.json, gitignores .dotnet/, and commits team install scripts so colleagues reproduce the same setup. ## Quick Start Ask the assistant to install the latest .NET 11 preview SDK locally for this project and configure global.json to use it.

Frequently Asked Questions about setup-local-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install a .NET SDK locally without affecting the system installation?

Run the official dotnet-install script with --install-dir .dotnet to place the SDK in a project-local folder, then add "paths": [".dotnet", "$host$"] to global.json. The dotnet host resolves the local SDK first, and deleting .dotnet/ fully reverts the setup.

How do I test a .NET preview SDK safely on my project?

Install the preview into a local .dotnet directory using --channel and --quality preview flags, then set allowPrerelease to true in global.json. The system-wide SDK stays untouched, and the preview is only resolved within the project directory.

Does the global.json paths feature work with older .NET versions?

No, the paths feature requires a .NET 10 or later host SDK installed system-wide. On older hosts the paths array is ignored, so you must install .NET 10+ globally before using local SDK resolution.

Why are my installed workloads missing after a local SDK setup?

Workloads were likely installed with the system dotnet instead of the local binary. Workload metadata is stored relative to the host process's dotnet root, so always run ./.dotnet/dotnet workload install to keep workloads with the local SDK.

Can I pin an exact .NET SDK version for my team?

Yes, install with --version for the exact build and set rollForward to "disable" in global.json so resolution never moves to another feature band. Commit the generated install-dotnet.sh or install-dotnet.ps1 scripts so teammates reproduce the identical setup.