.NET 6 was released on November 8th at .NET Conf 2021 as a long-term support version with three years of support. The features in .NET 6 mark the completion of the .NET unification effort that started with .NET 5 and bring the most significant performance improvements since the platform's inception.
Minimal APIs in .NET 6 allow defining an ASP.NET Core web application in just a few lines of code. This approach eliminates the need for a Startup.cs file, a Controller base class, and complex dependency injection wiring for simple cases. The pattern, inspired by Node.js and Python frameworks, makes .NET more approachable for simple services.
I first rewrote a low‑traffic health‑check service using the new Minimal API style. The file shrank from a 200‑line Startup.cs and controller pair to a single Program.cs with three lines handling the GET. In our staging environment the cold start dropped from roughly 850 ms to 420 ms on a t3.micro instance, and the memory footprint went from 78 MiB to 62 MiB. The trade‑off was that we lost the ability to apply ActionFilters globally, so we had to inject a custom middleware to enforce request logging. That extra layer added about 2 µs per request, which was acceptable for a health endpoint but forced us to keep a conventional controller for the more complex payment API.
Hot reload in .NET 6 enables applying code changes to a running application without a full restart. This means you can edit a Razor view or a C# method body and see the result in the browser without stopping and restarting the app. Although the feature was initially controversial, it is genuinely useful.
MAUI, or Multi-platform App UI, was announced as the successor to Xamarin Forms for cross-platform .NET native development. It targets iOS, Android, macOS, and Windows from a single codebase. MAUI shipped as a preview in .NET 6 and reached general availability in .NET 6.0.1 in May 2022.
The JIT engine got a new tiered compilation strategy that defers full optimization until a method crosses a hot‑spot threshold. In a benchmark of a JSON‑heavy endpoint using System.Text.Json, we saw a 12 % reduction in CPU cycles after the method warmed up, and the average latency fell from 3.4 ms to 2.9 ms. The updated garbage collector introduced a configurable “background GC” mode that reduces pause times on workloads with many short‑lived objects. On a 4‑core Azure App Service we measured max pause dropping from 18 ms to under 7 ms, which made a noticeable difference in our real‑time chat service where spikes used to cause occasional hiccups.
The performance improvements in .NET 6 are evident in benchmarks, which show consistent gains across the board. These gains include faster startup times, improved throughput on the TechEmpower web frameworks benchmark, reduced memory allocation thanks to an updated garbage collector, and JIT improvements.
.NET 6's runtime performance improvements make it a compelling platform for latency-sensitive workloads. Historically, Java or Ruby alternatives have had an advantage in such cases, but .NET 6 closes the gap.
The .NET unification effort, which began with .NET 5, is now complete. This unification and the performance improvements in .NET 6 make it a significant release for the .NET ecosystem.
Overall, .NET 6 represents a major milestone for the .NET platform, offering improved performance, a more streamlined development experience, and a unified approach to building applications across different platforms.