Plans and validates .NET SDK, runtime, target framework, language, package, and legacy application migrations. Use for framework upgrades or obsolete API transitions; do not use for isolated NuGet health checks (use dependency-audit).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Dotnet Migration?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/k4ndev-dotnet-migration)
---
name: dotnet-migration
description: Plans and validates .NET SDK, runtime, target framework, language, package, and legacy application migrations. Use for framework upgrades or obsolete API transitions; do not use for isolated NuGet health checks (use dependency-audit).
---
# .NET Migration
## Purpose
Upgrade .NET applications in controlled, verifiable steps while preserving behavior and deployment compatibility.
## Scope
SDK/TFM, C# language version, package/provider compatibility, obsolete API changes, build/publish, OS/container/runtime deployment, and legacy .NET Framework transitions.
## When to use
- User asks to migrate/upgrade a .NET version or replace obsolete APIs across a project.
- An EOL target or runtime compatibility issue requires a staged plan.
## Do not use for
- Isolated package vulnerability/license audit: use `dependency-audit`.
- Adding a new NuGet library: use `nuget-package-development`.
- Feature refactoring unrelated to migration: use the appropriate domain skill.
## Required context
Inventory SDK pin, target frameworks, language version, packages/providers, analyzers, hosting model, CI, deployment images, OS/architecture, native dependencies, and support/EOL requirements.
## Workflow
1. Record baseline build/test/publish output and current runtime/deployment matrix.
2. Identify exact source and target versions, supported upgrade path, breaking changes, package/provider compatibility, and deprecated API replacements from authoritative release docs.
3. Separate TFM/tooling changes from behavioral refactors; plan reversible commits and compatibility gates.
4. Update SDK/TFM/package settings intentionally; resolve new diagnostics rather than blanket-suppressing them.
5. Validate unit/integration tests, analyzer build, publish output, containers/OS, startup, health, TLS, globalization, and native dependencies as applicable.
6. Check trimming/AOT only if the product uses or plans it; preserve required annotations/reflection behavior.
7. Summarize unresolved compatibility risks and require explicit authorization before deployment or production runtime changes.
## Decision rules
- Do not infer the latest supported version from memory; check official support policy at migration time.
- Avoid mixing framework migration with unrelated architecture changes.
- Treat legacy .NET Framework synchronization-context, `System.Web`, and unsupported API constraints separately from modern .NET.
## Expected output format
Give current/target matrix, staged changes, package/OS blockers, exact validation commands/results, rollout/rollback notes, and remaining risks.
## Common mistakes
- Changing TFM without updating CI/container runtime, upgrading all packages indiscriminately, suppressing analyzer warnings, or claiming `publish` works based only on `build`.
## Edge cases
- Multi-target libraries can require conditional APIs and API compatibility checks per TFM.
- Native dependencies/crypto providers/globalization settings can fail only in production images.
- SDK roll-forward and runtime roll-forward are distinct; inspect `global.json` and deployment policy.
## Examples
See [migration examples](examples.md) for a staged TFM update and deployment matrix.
## Test scenarios
- Positive: “Move this worker from net8.0 to net10.0 and verify packages, Linux image, and publish behavior.”
- Negative: “Is package X vulnerable?” routes to `dependency-audit`.
- Boundary: a framework upgrade with transitive dependency vulnerabilities selects this skill and `dependency-audit` for package risks.
## Related skills
`dependency-audit`, `testing-quality`, `aspnetcore-patterns`, `dotnet-diagnostics`, `nuget-package-development`.