We sell .NET modernisation, and our own website was running on .NET 6, which left Microsoft support on 12 November 2024. This is a plain account of how we moved it to .NET 10 LTS, what broke, and the numbers we measured along the way.

Where we started

The site is a small ASP.NET Core MVC application with a separate class library for data access, Entity Framework Core against SQL Server, Razor views, contact and enquiry forms, and an AI chat assistant that calls the OpenAI API. Before the upgrade it had:

  • Target framework net6.0 in both projects, an unsupported runtime that no longer receives security fixes.
  • Entity Framework Core 7.0.11, also out of support.
  • Packages nobody used: two LangChain packages, Razor runtime compilation, the Visual Studio scaffolding package, and Microsoft.AspNet.Mvc 5.2.9 (an ASP.NET MVC 5 package for .NET Framework) referenced by the data library.
  • Explicit references to 10.x Microsoft.Extensions.* packages while targeting .NET 6, which produced a long list of "doesn't support net6.0" build warnings.

What we changed

  1. Retargeted both projects to net10.0. .NET 10 is the current LTS release, supported until 14 November 2028 (see Microsoft's support policy).
  2. Moved EF Core to 10.0.x (core, SQL Server provider and tools together, all on the same patch version).
  3. Removed seven package references that the code did not use, including the framework-provided Microsoft.Extensions.* packages that the web SDK already supplies.
  4. Built, read every warning, and fixed what mattered rather than suppressing it.

What broke

One thing, and it is a common one. Our CAPTCHA image endpoint uses System.Drawing. On .NET 6 the System.Drawing.Common assembly reached the project transitively through one of the unused packages we removed. Once that package was gone, the build failed with CS1069 errors ("this type has been forwarded to assembly System.Drawing.Common").

The fix was to reference System.Drawing.Common explicitly. Because that library is Windows-only on modern .NET, the analyser also raised CA1416 platform warnings. Our site is hosted on Windows and IIS, so we marked the controller with [SupportedOSPlatform("windows")] to document the constraint. If we ever move to Linux containers, that CAPTCHA will need a cross-platform image library or a hosted CAPTCHA service instead.

The lesson: removing unused packages can remove transitive dependencies you were relying on without knowing it. Upgrade and clean up in small steps, and build after each one.

We also fixed an MVC1000 analyser warning by replacing a synchronous Html.Partial call with await Html.PartialAsync, which avoids blocking a thread while the partial renders.

What we fixed in the same release

An upgrade is a good moment to deal with the things a runtime change exposes. Alongside the move to .NET 10 we:

  • moved the database connection string, mail password and API key out of the committed appsettings.json into environment variables and an untracked local file;
  • turned on antiforgery validation for every POST request and added per-IP rate limits to the forms and the chat endpoint;
  • added security headers (content security policy, frame options, referrer policy, permissions policy), a permanent 308 HTTP-to-HTTPS redirect and a one-year HSTS policy;
  • made all cookies Secure and at least SameSite=Lax in production.

What we measured

Before starting, we ran Google PageSpeed Insights against the live homepage (14 November 2026). On the emulated mobile profile it scored 70 for performance, with a Largest Contentful Paint of 3.8 seconds and a total page weight of about 17.5 MB.

The runtime upgrade itself does not change what the browser downloads, so we also cleaned up the front end. Measured locally on the homepage, uncompressed:

Homepage assetBeforeAfter
JavaScript files (local)24 tags, 2,698 KB17 tags, 693 KB
Stylesheets (local)16 files, 690 KB11 files, 527 KB
Images used across the site31 files, 29.0 MB31 files, 2.5 MB

Most of the JavaScript saving came from two libraries the pages never used: a newsletter-form script of about 985 KB and a map library of about 980 KB, which also carried an access token left over from the original website theme. We also removed an animation library that was never initialised, two unused jQuery plugins, and a second, older copy of jQuery Validate that loaded on every page alongside the newer one.

The image saving came from resizing images to the size they are displayed at and saving photographs as JPEG instead of PNG. A 28 MB video that was no longer shown on any page was moved out of the published web folder altogether.

We will rerun PageSpeed Insights once the new build is live and update this article with the field results rather than estimating them here.

Deployment notes

  • IIS needs the .NET 10 Hosting Bundle installed on the server before the new build is deployed. Without it, the site fails to start. The alternative is a self-contained publish, which ships the runtime with the application.
  • Secrets are no longer in the published appsettings.json, so the server needs its environment variables or local settings file in place first.
  • Keep the previous build so you can roll back quickly if something you did not test behaves differently.

What we would tell a client

  • Moving a small, well-structured ASP.NET Core application between LTS versions is usually straightforward. The surprises are in dependencies, not in your own code.
  • Inventory packages first and remove what you do not use, but build after each removal.
  • Read the warnings. Platform and analyser warnings often point to real deployment constraints.
  • Plan the hosting change (runtime installation, configuration, secrets) as carefully as the code change.

Still running .NET 6, 8 or .NET Framework?

We help teams plan and carry out upgrades to .NET 10, starting with a short assessment of the code, packages and hosting.

.NET modernisation