setup-local-sdk
하는 일
이 스킬은 프로젝트 전용 폴더에 .NET SDK를 설치해, 컴퓨터의 기본 .NET 설치를 바꾸지 않고 프리뷰나 특정 버전을 시험할 수 있게 합니다. 격리되었거나 재현 가능한 환경을 원하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓컴퓨터 전체의 .NET 설치를 바꾸지 않고 .NET 프리뷰를 시험하고 싶을 때.
- ✓프로젝트가 팀 모두에게 정확히 하나의 .NET SDK 버전을 쓰도록 해야 할 때.
- ✓팀이나 CI 설정을 위해 반복 가능한 설치 스크립트가 필요할 때.
스킬 링크
https://github.com/dotnet/skills/blob/main/plugins/dotnet/skills/setup-local-sdk/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 프로젝트 폴더 안에 .NET 11 프리뷰 SDK를 설치해서, 제 컴퓨터의 .NET을 바꾸지 않고 시험할 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트가 선택한 SDK를 프로젝트 안의 폴더에 설치하고, 그 폴더에서 dotnet 명령이 자동으로 그것을 쓰도록 global.json을 설정합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
dotnetcommands from the project root. - Can be deleted to revert (
rm -rf .dotnet/orRemove-Item -Recurse -Force .\.dotnet).
When NOT to use
- User wants a system-wide install — direct to the official installer.
- Host
dotnetis older than v10 —pathsdoesn't exist; explain and stop. - User needs a runtime-only install —
pathsapplies 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
- A .NET 10+ SDK is installed globally — run
dotnet --version; major ≥ 10. - curl (macOS/Linux) or PowerShell (Windows) is available.
Workflow
Step 1 — Clarify what to install
If the user didn't specify, ask what .NET SDK version they want (e.g., "latest
.NET 11 preview" or an exact version like 11.0.100-preview.2.26159.112).
Map the answer to --channel/--quality or --version flags.
Step 2 — Verify .NET 10+ host
If the user already provided dotnet --version output, treat that as the
authoritative version for their machine. Do not override it with the agent
workspace's version; if the two differ, explain that the workspace differs and
continue advising for the user's machine.
dotnet --version
If major version < 10, stop before downloading anything: the paths feature
requires a .NET 10+ host SDK. Tell the user to install .NET 10 or later
system-wide first, then return to the local SDK setup.
Step 3 — Detect operating system
Run uname -s 2>/dev/null. If it succeeds (including MINGW*, MSYS*, CYGWIN* —
these are bash-capable environments like Git Bash) → use bash/dotnet-install.sh.
If it fails (native Windows without Git Bash) → use PowerShell/dotnet-install.ps1.
Step 4 — Check for existing local SDK
macOS / Linux:
test -d .dotnet && echo "exists" || echo "not found"
Windows (PowerShell):
if (Test-Path -LiteralPath .\.dotnet) { "exists" } else { "not found" }
If .dotnet/ exists, ask: update with the new version, or skip and keep it?
Step 5 — Download and run the install script
macOS / Linux:
INSTALL_SCRIPT="$(mktemp "${TMPDIR:-/tmp}/dotnet-install.XXXXXX")"
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
Windows (PowerShell):
$installScript = Join-Path $env:TEMP "dotnet-install-$([guid]::NewGuid()).ps1"
try {
Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -OutFile $installScript
& $installScript -Channel <CHANNEL> -Quality <QUALITY> -InstallDir .dotnet
}
finally {
if (Test-Path -LiteralPath $installScript) {
Remove-Item -LiteralPath $installScript -Force
}
}
For exact versions: use --version <VERSION> (bash) or -Version <VERSION> (PowerShell)
instead of channel/quality flags. The install scripts are from Microsoft's official
URLs: https://dot.net/v1/dotnet-install.sh and https://dot.net/v1/dotnet-install.ps1.
Step 6 — Identify the installed version
./.dotnet/dotnet --version # macOS/Linux
.\.dotnet\dotnet.exe --version # Windows
Record the exact version string (e.g., 11.0.100-preview.2.26159.112) for global.json.
Step 7 — Create or update global.json
{
"sdk": {
"version": "<INSTALLED_VERSION>",
"allowPrerelease": true,
"rollForward": "latestFeature",
"paths": [".dotnet", "$host$"],
"errorMessage": "Required .NET SDK not found. Run ./install-dotnet.sh (or .ps1) to install it locally."
}
}
paths:.dotnetfirst (local priority),$host$= system-wide fallback.rollForward: "latestFeature": use
자주 묻는 질문
되돌리려면 어떻게 하나요?
로컬 SDK 폴더를 삭제하면 격리된 설치가 제거됩니다.
더 최신 .NET이 이미 설치되어 있어야 하나요?
네. global.json 경로 기능은 호스트에 .NET 10 이상 SDK가 필요합니다.
런타임만 설치하나요?
아니요. 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.
repo: dotnet/skills
인기도
- GitHub 스타
- 5.8k
- 순위
- #14654
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-custom-agent
5.8k에이전트가 자체 도구, 지침, 다른 에이전트로의 핸드오프를 가진 VS Code 커스텀 에이전트 파일을 만들도록 돕습니다.
create-skill
5.8k에이전트가 올바른 이름, 명확한 트리거 설명, 표준을 따르는 SKILL.md 파일로 새 에이전트 스킬을 만들도록 돕습니다.
csharp-scripts
5.8k에이전트가 .NET 명령줄 도구로 작은 C# 프로그램을 전체 프로젝트 없이 단일 파일로 실행하도록 돕습니다.
dotnet-pinvoke
5.8k에이전트가 .NET에서 네이티브 C나 C++ 라이브러리를 올바르게 호출하도록 돕습니다. 시그니처, 문자열 처리, 메모리, 안전 핸들을 다룹니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.