.NET SDK and runtime installation across Windows, macOS, and Linux. Handles version detection, platform-specific installers (WinGet, Homebrew, apt, dnf), SDK vs runtime selection, offline installation, Docker setup, and troubleshooting. Auto-activates for .NET installation, setup, version management, and multi-platform deployment.
Automated .NET SDK and runtime installation with intelligent platform detection, version management, and troubleshooting guidance.
dotnet --version
# Output: 8.0.100
dotnet --list-sdks
# Output: 8.0.100 [/usr/local/share/dotnet/sdk]
dotnet --list-runtimes
# Output: Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
The skill automatically detects your operating system and recommends the best installation method:
# Detected: macOS 14.2 (arm64)
# Recommended: Official installer package (.pkg)
# Alternative: Homebrew (brew install dotnet)
Windows (WinGet):
# Install .NET 8 SDK (LTS)
winget install Microsoft.DotNet.SDK.8
# Verify installation
dotnet --version
# Output: 8.0.100
macOS (Official Installer):
# Download and install from:
# https://dotnet.microsoft.com/download/dotnet/8.0
# Or use Homebrew:
brew install dotnet
# Verify installation
dotnet --version
# Output: 8.0.100
Linux (Ubuntu/Debian):
# Add Microsoft package repository
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
# Install .NET 8 SDK
sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0
# Verify installation
dotnet --version
# Output: 8.0.100
Install SDK when:
dotnet build or dotnet runInstall Runtime only when:
# Install SDK (includes runtime)
sudo apt-get install dotnet-sdk-8.0
# Install runtime only (smaller)
sudo apt-get install aspnetcore-runtime-8.0 # For ASP.NET Core apps
sudo apt-get install dotnet-runtime-8.0 # For console apps
# List available .NET versions
winget search Microsoft.DotNet.SDK
# Install .NET 8 SDK (LTS)
winget install Microsoft.DotNet.SDK.8
# Install specific version
winget install Microsoft.DotNet.SDK.8 --version 8.0.100
# Update existing installation
winget upgrade Microsoft.DotNet.SDK.8
# Visual Studio 2022 detected at: C:\Program Files\Visual Studio\2022\Community
# .NET 8 SDK available via: Modify Installation → .NET desktop development
Installation steps:
# Download: https://dotnet.microsoft.com/download/dotnet/8.0
# File: dotnet-sdk-8.0.100-win-x64.exe
# SHA512: [verification hash]
# Run installer (GUI)
.\dotnet-sdk-8.0.100-win-x64.exe
# Or silent install
.\dotnet-sdk-8.0.100-win-x64.exe /install /quiet /norestart
# Download install script
Invoke-WebRequest -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1
# Install latest .NET 8 SDK
.\dotnet-install.ps1 -Channel 8.0
# Install to custom location
.\dotnet-install.ps1 -Channel 8.0 -InstallDir "C:\Program Files\dotnet"
# Install runtime only
.\dotnet-install.ps1 -Channel 8.0 -Runtime dotnet
# Detected: Apple Silicon (arm64)
# Recommended: dotnet-sdk-8.0.100-osx-arm64.pkg
# Download from: https://dotnet.microsoft.com/download/dotnet/8.0
# Double-click .pkg file to install
# Verify installation location
which dotnet
# Output: /usr/local/share/dotnet/dotnet
# Install Homebrew (if needed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install .NET SDK
brew install dotnet
# Install specific version (if available)
brew install dotnet@8
# Update existing installation
brew upgrade dotnet
# Download install script
curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
chmod +x dotnet-install.sh
# Install latest .NET 8 SDK
./dotnet-install.sh --channel 8.0
# Install to custom location
./dotnet-install.sh --channel 8.0 --install-dir ~/.dotnet
# Add to PATH
echo 'export PATH="$HOME/.dotnet:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Ubuntu 22.04 LTS
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
# Ubuntu 20.04 LTS
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
# Install SDK
sudo apt-get update
sudo apt-get install -y dotnet-sdk-8.0
# Install runtime only
sudo apt-get install -y aspnetcore-runtime-8.0
# Fedora 39
sudo dnf install dotnet-sdk-8.0
# RHEL/CentOS (register Microsoft repository first)
sudo dnf install https://packages.microsoft.com/config/rhel/9/packages-microsoft-prod.rpm
sudo dnf install dotnet-sdk-8.0
# Install from official repositories
sudo pacman -S dotnet-sdk
# Install runtime only
sudo pacman -S aspnet-runtime
# Add Microsoft repository
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
# Install .NET 8
./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet
# Add to PATH
export PATH="$PATH:/usr/share/dotnet"
Control which .NET SDK version your project uses:
# Create global.json for .NET 8
dotnet new globaljson --sdk-version 8.0.100
# View current global.json
cat global.json
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestPatch"
}
}
Roll-forward policies:
latestPatch - Use latest patch (8.0.x)latestFeature - Use latest feature band (8.x.x)latestMinor - Use latest minor (x.x.x)disable - Exact version requiredSDK Components:
.NET SDK 8.0.100
├── Runtime (8.0.0)
├── Compiler (Roslyn)
├── CLI Tools (dotnet build, run, publish)
├── Templates (dotnet new)
└── MSBuild
Runtime-Only Components:
.NET Runtime 8.0.0
├── CoreCLR (execution engine)
├── Base Class Libraries
└── Framework assemblies
Size comparison:
.NET supports multiple versions installed simultaneously:
# List all installed SDKs
dotnet --list-sdks
# Output:
# 6.0.420 [/usr/local/share/dotnet/sdk]
# 7.0.410 [/usr/local/share/dotnet/sdk]
# 8.0.100 [/usr/local/share/dotnet/sdk]
# Install additional versions
sudo apt-get install dotnet-sdk-7.0 # Adds to existing installation
# Project selects version via global.json
cd my-project
cat global.json
# { "sdk": { "version": "7.0.410" } }
dotnet --version
# Output: 7.0.410 (selected by global.json)
For air-gapped environments or restricted networks:
# Download offline installer
# https://dotnet.microsoft.com/download/dotnet/8.0
# Select: x64 | Binaries
# Extract to destination
Expand-Archive dotnet-sdk-8.0.100-win-x64.zip -DestinationPath "C:\Program Files\dotnet"
# Add to PATH
$env:PATH = "C:\Program Files\dotnet;$env:PATH"
[Environment]::SetEnvironmentVariable("PATH", $env:PATH, "Machine")
# Download tarball
wget https://download.visualstudio.microsoft.com/download/pr/[hash]/dotnet-sdk-8.0.100-linux-x64.tar.gz
# Extract to system location
sudo mkdir -p /usr/local/share/dotnet
sudo tar -xzf dotnet-sdk-8.0.100-linux-x64.tar.gz -C /usr/local/share/dotnet
# Create symlink
sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/dotnet
# Use official .NET SDK image
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
# Copy and restore project
COPY *.csproj ./
RUN dotnet restore
# Build application
COPY . ./
RUN dotnet publish -c Release -o out
# Runtime image (smaller)
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "MyApp.dll"]
# Verify dotnet location
which dotnet # macOS/Linux
where.exe dotnet # Windows
# If not found, add to PATH manually:
# macOS/Linux (bash)
echo 'export PATH="$PATH:/usr/local/share/dotnet"' >> ~/.bashrc
source ~/.bashrc
# macOS (zsh)
echo 'export PATH="$PATH:/usr/local/share/dotnet"' >> ~/.zshrc
source ~/.zshrc
# Windows (PowerShell)
$env:PATH = "$env:PATH;C:\Program Files\dotnet"
# Check installation location
dotnet --info
# Look for "Base Path:" in output
# Register installation manually (Linux)
sudo ln -s /usr/local/share/dotnet/dotnet /usr/bin/dotnet
# Clear NuGet cache if corrupted
dotnet nuget locals all --clear
# Remove specific SDK version
sudo apt-get remove dotnet-sdk-7.0 # Linux
winget uninstall Microsoft.DotNet.SDK.7 # Windows
# Force project to use available SDK
# Edit global.json:
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestMinor" # More permissive
}
}
Comprehensive Details: See reference.md for:
Official Documentation:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer