.NET

Migrating from .NET Framework to modern .NET without a big-bang rewrite

The strangler-fig pattern, YARP and incremental migration: a practical playbook for legacy .NET estates.

Odiflux Engineering · 21 August 2026 · 4 min read

Rewrites are risky. A full rewrite of a business-critical .NET Framework application freezes new features for months, has to reproduce years of undocumented behaviour, and puts everything on one cut-over weekend.

Incremental migration avoids all three. The old application keeps running while new code takes over one route at a time, and every step ships to production. This is the playbook we use, based on the strangler-fig pattern and Microsoft's own tooling for it.

Pick the target first

Target the current long-term support (LTS) release of .NET. LTS versions get three years of patches; standard-term releases get less, which means another upgrade sooner. Check Microsoft's support policy when you plan, because a version that is current when you start may be near its end of support by the time you finish.

.NET Framework 4.8.x is still supported as part of Windows, so there is no emergency. But it gets no new features, it ties you to Windows servers, and the libraries and developers you depend on are moving on. The cost of staying grows every year.

Step 1: Inventory what you have

Before moving anything, find out what will move easily and what won't.

  • Run the .NET Upgrade Assistant to analyse projects and flag unsupported APIs
  • List NuGet packages and check which have modern .NET versions
  • Find Windows-only dependencies: System.Web, WCF services, Web Forms pages, AppDomains, .NET Remoting, COM components
  • Map which parts of the app change most often; they benefit most from moving first

Step 2: Move shared libraries to .NET Standard

Class libraries with business logic, data access and models are usually the easiest part. Retarget them to .NET Standard 2.0, or multi-target them, so the same library works in both the old .NET Framework app and the new one.

This step alone often removes half the migration risk, because the logic you care about is now shared rather than duplicated.

Step 3: Put a YARP proxy in front

Create a new ASP.NET Core application that sits in front of the legacy one. It runs YARP, Microsoft's reverse proxy library, and forwards every request it doesn't handle to the old app.

Users notice nothing: the same URLs keep working. But from now on, each route can be served by either application, and you choose which one by moving code, not by changing infrastructure.

Step 4: Share authentication and session

Both applications must agree on who the user is. Microsoft's System.Web adapters let the new ASP.NET Core app read the legacy app's authentication and session state, so a user who logs in once is recognised by both.

Get this working with a single trivial route before migrating anything meaningful. It is the part most likely to surprise you.

Step 5: Migrate vertical slices

Move one feature at a time, end to end: controller, views or API, and any data access it needs. Start with something valuable but self-contained, such as a reporting screen or a read-only API.

When a slice is ready, switch its route in the proxy, watch it in production, and keep the old code until you are confident. If something goes wrong, switching the route back is a one-line change.

Step 6: Prove parity with tests

The old application is the specification. Before switching a route, compare old and new behaviour: integration tests that call both and compare responses, snapshot tests for generated documents and reports, and for critical paths, a period of shadow traffic where both versions run and only the old response is returned.

What doesn't migrate incrementally

A few technologies have no direct path and need a planned rewrite, page by page or service by service.

  • Web Forms pages: rebuild as Razor Pages, MVC views or Blazor components
  • WCF services: move to CoreWCF to keep the contract, or to gRPC or REST when clients can change
  • AppDomains and .NET Remoting: replace with separate processes and standard protocols

Because the proxy is already in place, even these rewrites ship one page or one endpoint at a time.

Step 7: Containerise and modernise hosting

Modern .NET runs on Linux, which opens up containers, Kubernetes and cheaper hosting. Containerise the new application early so every migrated slice is deployed the same way, then move to Azure, another cloud or your own servers when the business is ready. Hosting is a separate decision from the migration and doesn't have to happen at the same time.

Finishing

The migration is done when the proxy forwards nothing to the old app. Remove the legacy application, the System.Web adapters and eventually the proxy itself. By then the team has been shipping on modern .NET for months, and there was never a weekend where everything changed at once.

Keep reading

The 12-point Odoo implementation checklist we use on every projectERP
18 September 20266 min read

The 12-point Odoo implementation checklist we use on every project

Most ERP projects fail before a single line of configuration. Here's the checklist that keeps ours on time and on budget.

The most common vulnerabilities we found in business apps this yearCybersecurity
2 September 20264 min read

The most common vulnerabilities we found in business apps this year

Broken access control still tops the list, but AI features are creating a new class of risk.

How to find your first 10 automation wins in a weekAutomation
5 August 20263 min read

How to find your first 10 automation wins in a week

A simple scoring model to prioritise automation by effort, frequency and risk, with examples from finance, HR and sales.

Tell us about your challenge. A solutions architect will reply within one business day with ideas, not a sales pitch.