agentleFS
MicrosoftKnown publishermicrosoft/MicroHack/03-Azure/01-01-App Innovation/03_GHCPAppModernization/templates/skills/dotnet-upgrade/SKILL.md

dotnet-upgrade

Skill220 starsChanged 8 days agoMITView on GitHub

Transformation rules and verification steps for upgrading .NET Framework 4.x applications to .NET 10. WHEN: upgrade to .NET 10, migrate .NET Framework, retarget TFM, convert to SDK-style project, System.Web replacement, web.config migration, packages.config to PackageReference, binding redirect cleanup. NOT for: greenfield .NET apps, NuGet version bumps within the same TFM, Azure infrastructure changes.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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
  1. Very specific:

    Delete AssemblyInfo.cs attributes now generated by the SDK.

    line 35
  2. Very specific:

    Remove binding redirects from app/web.config (not honored on .NET 10).

    line 36

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

.NET Framework 4.x → .NET 10 Upgrade Rules

Purpose

Packages the API mappings, project-file rules, and verification checklist needed to retarget a .NET Framework app to .NET 10 without behavioral change.

Prerequisites

  • ASSESSMENT.md exists and is approved (AppCAT findings available).
  • .NET 10 SDK installed — verify: dotnet --list-sdks.

Procedure

Step 1 — Convert to SDK-style projects (leaf projects first)

dotnet tool install -g upgrade-assistant
upgrade-assistant upgrade .\src\{{Project}}.csproj
  • Migrate packages.config → PackageReference.
  • Delete AssemblyInfo.cs attributes now generated by the SDK.
  • Remove binding redirects from app/web.config (not honored on .NET 10).

Step 2 — Apply API transformation rules

Source pattern (.NET Framework)Target pattern (.NET 10)Notes
System.Web.Mvc controllersMicrosoft.AspNetCore.MvcRouting moves to endpoint routing
Global.asax / HttpModuleASP.NET Core middleware in Program.csOrder matters — replicate pipeline order
web.config appSettingsappsettings.json + IConfigurationKeep keys identical to limit churn
ConfigurationManager.AppSettingsIConfiguration via DIInject, don't service-locate
HttpContext.CurrentIHttpContextAccessorAudit for thread-safety assumptions
WCF server (System.ServiceModel)CoreWCF or gRPC/RESTDecision required — escalate to user
EF6 ObjectContext/EDMXEF Core (or EF6 on .NET 10 as interim)EDMX must be re-scaffolded for EF Core
System.Drawing (non-Windows)ImageSharp / SkiaSharpSystem.Drawing.Common is Windows-only
{{APP_SPECIFIC_RULE_1}}{{TARGET_1}}{{NOTE}}
{{APP_SPECIFIC_RULE_2}}{{TARGET_2}}{{NOTE}}

Step 3 — Verify

  • dotnet build zero errors across the solution
  • No remaining <TargetFramework>net4*</TargetFramework> (grep the repo)
  • No references to System.Web outside compat shims
  • Tests pass: dotnet test
  • CVE scan clean of criticals (appmod-dotnet-cve-check)

Common Pitfalls

  • ⚠️ Upgrading hub projects first — always go leaf-first in the dependency graph, or you'll chase cascading build breaks.
  • ⚠️ AppContext switches / legacy config quirks silently ignored on .NET 10 — search config for <runtime> elements and review each.
  • ⚠️ Culture-sensitive string APIs changed defaults (ICU vs NLS) — pin InvariantGlobalization consciously, don't copy-paste it.
  • ⚠️ {{APP_SPECIFIC_PITFALL}}

References

  • Microsoft Learn: "Upgrade from .NET Framework" / breaking changes by version
  • AppCAT rule documentation (linked from ASSESSMENT.md findings)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.