setup-local-sdk
Qué hace
Esta skill instala un SDK de .NET en una carpeta local del proyecto, para que puedas probar una versión preliminar o una versión concreta sin cambiar la instalación principal de .NET del equipo. Es para desarrolladores que quieren una configuración aislada o reproducible.
Cuándo usarla
- ✓Cuando quieres probar una versión preliminar de .NET sin cambiar tu instalación de .NET de todo el sistema.
- ✓Cuando un proyecto debe usar una versión exacta del SDK para todo el equipo.
- ✓Cuando quieres un script de instalación repetible para un equipo o una configuración de CI.
Link de la skill
https://github.com/dotnet/skills/blob/main/plugins/dotnet/skills/setup-local-sdk/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Instala el SDK de la versión preliminar de .NET 11 dentro de esta carpeta del proyecto para probarlo sin cambiar el .NET de mi equipo.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente instala el SDK elegido en una carpeta dentro del proyecto y luego configura global.json para que los comandos dotnet de esa carpeta lo usen automáticamente.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Cómo lo deshago?
Borras la carpeta local del SDK, lo que elimina la instalación aislada.
¿Necesito tener instalado un .NET más reciente?
Sí. La función de rutas de global.json necesita un SDK de .NET 10 o posterior en el equipo.
¿Instala solo un runtime?
No. Se aplica a instalaciones de SDK, así que las configuraciones solo de runtime necesitan otro enfoque.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 5,8 mil
- Posición en el ranking
- #14654
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
create-custom-agent
5,8 milAyuda a tu agente a crear archivos de agentes personalizados de VS Code, con sus propias herramientas, instrucciones y traspasos a otros agentes.
create-skill
5,8 milAyuda a tu agente a crear una skill nueva de agente con un nombre válido, una descripción de activación clara y un archivo SKILL.md que siga el estándar.
csharp-scripts
5,8 milAyuda a tu agente a ejecutar un pequeño programa en C# como un único archivo con la herramienta de línea de comandos de .NET, sin crear un proyecto completo.
dotnet-pinvoke
5,8 milAyuda a tu agente a llamar correctamente a librerías nativas de C o C++ desde .NET, cubriendo firmas, manejo de cadenas, memoria y handles seguros.
Skills parecidas
openclaw-update
394 milAyuda a tu agente a actualizar una Gateway de OpenClaw que ya existe, eligiendo el método de actualización que encaja con cómo se instaló y manteniendo tu sesión activa.
diagnose-gateway
394 milAyuda a tu agente a averiguar por qué falla tu Gateway de OpenClaw, revisando ajustes, canales y puertos sin cambiar nada.
crabbox-apps
394 milAyuda a tu agente a abrir y ejecutar una app en una máquina temporal en la nube y mostrar su vista en el panel lateral de tu chat.