✨ Shield now has support for Avalonia UI

.NET 5 has reached End of Life

May 5, 2022 | .NET

In recent years, especially with the pandemic, everything has been moving very fast. The release of .NET 5 by Microsoft was only a year and a half ago (specifically on November 10, 2020) and we have to say goodbye to it.

Sadly, Microsoft’s deadline for developers to migrate to .NET 6 is ending and support for .NET 5 ends on May 10, 2022 (yes, in a couple of days).

image 91
.NET Supported versions (Source: Microsoft)

On the bright side, the new version of the Framework: .NET 6, will bring LTS (long term support) and according to Microsoft, it will last until the end of 2024.

What will happen with .NET 5 projects?

One of the reasons why Microsoft is going to stop supporting .NET 5 (and other older versions) is because those versions must be signed with algorithms and currently they are signed with the SHA-1 algorithm. This algorithm has been vulnerable for some time and can affect from document signing, to HTTPS certificates, to backup systems and Version Controls (git).

As a curious fact, although this happened a couple of years ago, Google managed to break this algorithm by managing to have 2 different PDF files with the same Hash.

image 92
Attack proof (Source: https://shattered.io/)

At first nothing will happen, but you will no longer receive security updates and support from Microsft. It is not the end of .NET 5 because this date simply refers to updates, patches, technical support or security fixes but this could leave many applications exposed to new (and not so new) vulnerabilities.

That is why any developer who has projects in .NET 3.1 or .NET 5, should migrate them to .NET 6 in order to continue receiving all the updates and support from Microsoft.

What does .NET 6 bring?

The most expected from Microsoft, which has been trying to achieve this for years, is to make .NET a unified platform. And now according to Microsoft, .NET 6 will bring:

Unified platform across browser, cloud, desktop, IoT, and mobile apps, all using the same .NET Libraries and the ability to share code easily.

image 93
Unified and extended platform (Source: Microsoft)

In addition, the console app project template is reduced to just 1 line, which makes it easier to create small programs. In .NET 5 was:

using System;
  namespace MyApp // Note: actual namespace depends on the project name.
     internal class Program
         static void Main(string[] args)
             Console.WriteLine("Hello World!");

And with the arrival of .NET 6, this is reduced to just 1 line of code:

// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

📚 Featured: You can learn more about console app template in the original Microsoft article: .NET 6 C# console app template generates top-level statements

In addition, the new version 6 of the .NET Framework comes with a new language version: C# 10 (although previews of C# 11 are already being released). This version comes with many new features:

  • File-scoped namespace declaration
  • Constant interpolated strings
  • Extended Property Patterns

and more!

Not only that, but it also comes with the new version of its IDE: Visual Studio 2022. This new version of Visual Studio brings great news, now its 64-bit version is available. This means that the main process devenv.exe no longer has the limitation it had in the 32-bit version (4GB in memory).

Microsoft showed how this new version is capable of loading a solution of more than 300,000 files.

image 12
Visual Studio 2022 64-bit(Source: Microsoft)

Let’s not forget Hot Reload, the feature that allows you to make changes to the debugging project without having to stop and start it again

How to upgrade to .NET 6?

Microsoft strongly recommends upgrading applications to .NET 6 and for that purpose leaves this article on how to do it: Upgrading to .NET 6.0

After saying goodbye to .NET 5 and enjoying .NET 6, we are still waiting for all the news and updates from Microsoft about .NET 7. Will they surprise us? Who knows.

You May Also Like