dotnet-upgrade
Skill5 starsChanged 54 days agoMITView on GitHub
Upgrade a .NET codebase to a newer .NET: .NET Framework 4.x to modern .NET, an out-of-support netcoreapp/net5+ to the current LTS, or netstandard libraries that only pretend to be portable. Use to assess, plan, execute, or resume a long-running upgrade while product work keeps shipping on the main branch.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- github/awesome-copilottheir own version, first seen Oct 25, 2026
- microsoft/MicroHacktheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- github/awesome-copilot★ 41ksame name
- microsoft/MicroHack★ 220same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- agents-memorySkill
- agentsview-extractSkill
- agentsview-resumeSkill
- backfill-unit-testsSkill
- github-epicSkill
- gitlab-epicSkill
- miseSkill
- pr-workflowSkill
- record-walkthroughSkill
- setup-agent-ready-repoSkill
- tech-leadSkill
- tidy-commitsSkill
- write-e2e-testsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Cold start: every session, including one after context compaction, begins by reading the upgrade state, never by remembering it.
- Very specific: line 29
Before anything else, find or create the state surface.
- Distinctive: line 48
Prior migration work: Search git history for retargets, multi-target commits, DI or config rewrites, and projects on newer TFMs.
- Distinctive: line 64
Put every open option to the user in one round, each with your recommendation, and record the answers in the state surface.
- Very specific: line 88
Write the task list into the state surface.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
.NET Upgrade
A long upgrade outlives any one session and runs beside product work that keeps landing on trunk. Two ideas carry the whole skill:
- Trunk-safe: a change is trunk-safe when the old target's build output and runtime behaviour stay the same. Trunk-safe work merges to the main branch early, in small requests. A host's runtime switch is trunk-safe too: the new runtime gets its own entry point beside the old one, and the host cuts over by deployment.
- Cold start: every session, including one after context compaction, begins by reading the upgrade state, never by remembering it.
Upgrade state
Before anything else, find or create the state surface. Read
references/state.md: it decides where the plan,
decisions, and progress live, and holds the resume protocol. An upgrade
already in progress resumes at the task its state names; skip to Execute.
1. Assess (read-only)
Inventory the repository. Done when every *.csproj, including the ones
no *.sln/*.slnx/*.slnf builds, has a row with:
- target framework(s), SDK-style or legacy format, project kind (web host, API, console, library, test, desktop), and the solutions that build it
- its dependency tier: tier 1 has no project references; tier N+1 depends only on lower tiers. Flag cycles.
- its blockers, graded by how many files each touches. Check the families
in
references/breaking-changes.md.
Then record four findings the table does not show:
- Prior migration work. Search git history for retargets, multi-target commits, DI or config rewrites, and projects on newer TFMs. Continue that direction rather than restarting it, and name its author so the user can coordinate.
- Fake portability. A
netstandard2.0project that still referencesSystem.Web, GAC assemblies,ref/*.dllbinaries, or Framework-only packages builds only under Framework MSBuild. Count these as Framework. - Verification gap. What the tests cover versus what the upgrade
touches, graded per
references/verification.md: test coupling to the replaced components, host coverage, smoke, and end-to-end triggers. - Deployment. How each host ships today (IIS, service, container), and what CI can and cannot prove.
2. Decide (one confirmation)
Put every open option to the user in one round, each with your recommendation, and record the answers in the state surface. Where the repo keeps ADRs, the target and platform decision is an ADR, and any doc that contradicts it is corrected in the same trunk-safe change.
- Target TFM and platform goal:
net10.0cross-platform, ornet10.0-windowswhere Windows-only APIs stay. - Scope: projects excluded or retired.
- Web host approach, per
references/framework-to-modern.md. - Branch strategy: entry points side by side on trunk, or an in-place
retarget on trunk where a host's deployment allows it; a long-lived
branch only for a host that fits neither
(
references/framework-to-modern.md). - Acceptance: which gates prove done, including a staging run when tests do not cover the runtime surface.
- Verification strategy: characterization tests, the test seam, smoke,
end-to-end, performance parity, and test data, per
references/verification.md. - Optional cross-platform build (developers on macOS or Linux build and
run the app): if chosen, add the phase in
references/cross-platform.md.
3. Plan
Write the task list into the state surface. Each task names its tier or
milestone, whether it is trunk-safe or branch-only, and a
Done when: line a reviewer can check without reading code. Order:
- Prerequisites: SDK pin in
global.json, CI toolchain, cleanup of dead projects and solution entries, and the test foundation (test seam, smoke command, test data) ahead of the first behaviour-touching task; low-risk tasks proceed meanwhile. - SDK-style conversion on the current TFM, leaf-first, one project per task. Never combine it with a retarget: the two fail differently.
- Retarget tier by tier. Libraries with Framework consumers multi-target
(
net472;net10.0); after each tier, every higher tier still builds and passes tests on the old target. - Hosts: a new entry point per host, or an in-place retarget where the Decide round chose it; APIs and consoles, then web apps.
- Cutover per host: staging validation, deploy the new entry point, keep the old one as the rollback. Drop the old target after the last host.
4. Execute
Per task:
- Cold start: re-read the decisions and the task.
- Research the specific APIs and packages before editing.
- Edit. Wherever the new target lacks behaviour or tests the old one
has, mark it
STUB:<package-or-api> | task:<id>sogit grep "STUB:"is the registry of deferred work; each marker becomes its own task. That covers a stubbed-out API, a#if NETFRAMEWORKwhose#elsedoes less, and aCompile Removeconditioned on the new target (an XML comment beside it). An adapter that behaves the same on both targets needs no marker. - Gate: the touched projects and their dependents build on every
target they carry, with no new warnings, and their tests pass, plus the
evidence the task's risk tier requires
(
references/verification.md). A test that fails where the upgrade did not intend a behaviour change means production code is wrong; fix the code, keep the test. When CI is the evidence, confirm the job actually ran on the change: path-filtered jobs often skip toolchain files (global.json,Directory.*.props, CI config), and a skipped job is no evidence. Run the build and test commands in the primary, since the next fix reads their output; hand only a build log too long to hold to alog-summarizer. - Record what changed, the gate evidence, and any deviation from the task, then commit. Trunk-safe tasks go out as their own small request.
Three identical gate failures in a row stop the task: report the error and its likely cause to the user.
5. Sync and cut over
Where a new project duplicates an old one, CI checks the migration
ledger on every trunk change: a migrated old file changed on trunk means
the port is stale. A fallback upgrade branch merges trunk on a fixed
cadence and after every trunk release, then reruns the gate. While old
and new hosts overlap, shared state must stay readable both ways
(references/framework-to-modern.md).
A host is cut over when the acceptance gates pass for it, smoke and the
main end-to-end flows pass on both entry points, performance stays within
its parity threshold, and redeploying the old entry point is the written
rollback. The upgrade is done when every host is cut over and the
STUB: registry is empty or accepted by the user.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

