dotnet-version-upgrade
БесплатноБез исполняемых скриптовНе проверенUpgrading .NET to a newer TFM. LTS-to-LTS, staged through STS, preview, upgrade paths.
от wshaddix★ 94 звезды на GitHubОб этом скилле
dotnet-version-upgrade
Comprehensive guide for .NET version upgrade planning and execution. This skill consumes the structured output from [skill:dotnet-version-detection] (current TFM, SDK version, preview flags) and provides actionable upgrade guidance based on three defined upgrade lanes. Covers TFM migration, package updates, breaking change detection, deprecated API replacement, and test validation.
Out of scope: TFM detection logic (owned by [skill:dotnet-version-detection]), multi-targeting project setup and polyfill strategies (see [skill:dotnet-multi-targeting]), cloud deployment configuration, CI/CD pipeline changes.
Cross-references: [skill:dotnet-version-detection] for TFM resolution and version matrix, [skill:dotnet-multi-targeting] for polyfill-first multi-targeting strategies when maintaining backward compatibility during migration.
Upgrade Lanes
Select the appropriate upgrade lane based on project requirements and ecosystem constraints.
| Lane | Path | Use Case | Risk Level |
|---|---|---|---|
| Production (default) | net8.0 -> net10.0 | LTS-to-LTS, recommended for most apps | Low -- both endpoints are LTS with long support windows |
| Staged production | net8.0 -> net9.0 -> net10.0 | When ecosystem dependencies require incremental migration | Medium -- intermediate STS version has shorter support |
| Experimental | net10.0 -> net11.0 (preview) | Non-production exploration of upcoming features | High -- preview APIs may change or be removed |
Lane Selection Decision Flow
- Are all your NuGet dependencies available on the target LTS? Yes -> Production lane (direct LTS-to-LTS).
- Do any dependencies require an intermediate version? Yes -> Staged production lane.
- Are you exploring preview features for R&D or proof-of-concept? Yes -> Experimental lane.
Production Lane: LTS-to-LTS (net8.0 -> net10.0)
The recommended default upgrade path. Both .NET 8 and .NET 10 are Long-Term Support releases, providing a stable migration with well-documented breaking changes.
Upgrade Checklist
Step 1: Update TFM in project files
<!-- Before -->
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<!-- After -->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
For solutions with shared properties:
<!-- Directory.Build.props -->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
Step 2: Update global.json SDK version
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
Step 3: Update NuGet packages
Use dotnet-outdated to detect stale packages and identify which packages need updates for TFM compatibility:
# Install dotnet-outdated as a global tool
dotnet tool install -g dotnet-outdated-tool
# Check for outdated packages across the solution
dotnet outdated
# Check a specific project
dotnet outdated MyProject/MyProject.csproj
# Auto-upgrade to latest stable versions
dotnet outdated --upgrade
# Upgrade only to the latest minor/patch (safer)
dotnet outdated --upgrade --version-lock major
For ASP.NET Core shared framework packages, update version references to match the target TFM:
<ItemGroup>
<!-- Match package version to TFM major version -->
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.*" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.*" />
</ItemGroup>
Step 4: Review breaking changes
# Build to surface warnings and errors
dotnet build --warnaserror
# Run analyzers for deprecated API usage
dotnet build /p:TreatWarningsAsErrors=true
Review the official breaking change lists:
Step 5: Replace deprecated APIs
Common replacements when moving from net8.0 to net10.0:
| Deprecated | Replacement | Notes |
|---|---|---|
BinaryFormatter |
System.Text.Json or MessagePack |
BinaryFormatter throws PlatformNotSupportedException starting in net9.0 |
Thread.Abort() |
Cooperative cancellation via CancellationToken |
Thread.Abort() throws PlatformNotSupportedException |
WebRequest / HttpWebRequest |
HttpClient via IHttpClientFactory |
Obsolete (SYSLIB0014), migrate to HttpClient |
Recommended modernizations (not deprecated, but improve performance and AOT readiness):
| Pattern | Improvement | Notes |
|---|---|---|
Regex without source gen |
[GeneratedRegex] attribute |
Source-generated regex is faster and AOT-compatible |
Step 6: Run tests and validate
# Run full test suite
dotnet test --configuration Release
# Enable trim/AOT analyzers to surface compatibility warnings without publ
Установить dotnet-version-upgrade в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dotnet-version-upgrade?
Upgrading .NET to a newer TFM. LTS-to-LTS, staged through STS, preview, upgrade paths.
Как установить скилл dotnet-version-upgrade?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dotnet-version-upgrade запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic