What's New In .NET 6

Today I want to make you aware of all the new features of .NET 6, the Windows framework, so that you are the first to enjoy them.

After more than a year of development, the version of .NET 6 that was already released by Microsoft, this is an LTS version, which allows cross-platform management and comes with new features and performance improvements.

If you want to know about its improvements in the update, I invite you to continue reading to know more.

Most important features of .NET 6
 

LTS version

.NET 6 is an LTS (Long Term Support) version, so it will be supported for three years, just like its previous version .NET Core 3.1. This version 3.1 will be finalized in December 2022 while .NET 5 will no longer be supported from May 2022.

Unified platform

Enables easier code sharing through a unified platform. You can implement APIs, cloud, desktop, IoT and mobile applications using the same .NET libraries in all of them.

Improved performance

The code has been simplified to be more optimal. From Microsoft they promise "massive performance improvements" with significant savings in memory in the cloud and in latency and execution times.

This is made possible by the inclusion of PGO dynamic profiles, inner class sealing, and per-message compression in WebSockets, among other enhancements.

New C# 10

.NET 6 ships with the new version of C# 10, the object-oriented programming language. Among the updates included in C# 10 are the use of global using directives, improvements in structure types, interpolated string handler, etc.

Enhancements in Visual Basic

Visual Basic has been updated especially for Windows Forms and WPF projects. It has a new ApplyApplicationDefaults event, which allows you to set application-wide values ​​such as Font, MinimumSplashScreenDisplayTime, or HighDpiMode.

Hot Reload or hot reloads

With .NET you can do hot reloads, avoiding having to recompile and restart the application to see the changes. Hot downloads are supported in Visual Studio 2022 and in the CLI.

Enhanced JSON

The performance and capabilities of JSON have also been improved in this version of .NET. Thanks to the new C# source code generator, you will be able to choose different serialization models.

Minimal APIs

Ability to create an API with very little code, perfect for creating microservices or scaling much faster. Read here about the minimum APIs if you want to know more.

New features for Blazor

Blazor components can now be rendered dynamically from JavaScript. Other changes include experimental support for creating custom Blazor items.

Advance Compilation

.NET 6 also enables AOT (Ahead of Time) compilation of code directly in Blazor WebAssembly, resulting in better runtime performance. Although it should be noted that this improvement in the execution time is conditioned by an increase in the loading time, since this type of compilation weighs more than those of the IL type.

HTTP/3 Support

ASP.NET Core, HttpClient, and gRPC now include support for HTTP/3. This allows the underlying QUIC connection protocol to be used, which uses UDP and has TLS built in.

Increased security with OpenSSL 3

All cryptographic operations will be performed with the latest version of OpenSSL. Hence OpenSSL 3 is added, although it will be possible to continue using versions from 1.1 on Linux. 

These are just some of the improvements that you can find in .NET 6. If you want to know all the details, don't miss the extensive announcement of the update that they have made from Microsoft.

Now that you know the main new features of .NET 6, all you have to do is try them out, and don't forget to tell us what you think in the comments afterwards.