On November 10, 2020 Microsoft announced the release of .NET 5.0. The much-awaited upgrade is the next major release of .NET Core following 3.1. It is named .NET 5.0 and not .NET Core 4.0 for two reasons – first, Microsoft did not want users to confuse it with .NET Framework 4.0; and second, the word ‘Core’ was dropped to emphasize that this is the main implementation of .NET going forward, and that it supports more types of apps and more platforms than .NET Core or .NET Framework.

It is a big release as it encompasses a range of brand-new features and some very relevant improvements over its previous versions. Created with cross-platform compatibility in mind, .NET 5.0 does the critical job of unifying the so far fragmented scene of .NET platforms. Quoting it as the first release in the unification journey, Microsoft is certain that this upgrade will enable developers to move their .NET Framework code and apps to .NET 5.0. In that sense, it is expected to deliver significant value to developers. This new unified experience is supported by a single Base Class Library or BCL across various operating systems; it means that a single .NET 5.0 native application project would support targets such as Windows, Microsoft Duo (Android), and Apple iOS using native controls on each of the platforms.

Highlights of .NET 5.0

.NET 5.0 comes with several major and much needed improvements and features. In terms of performance, it offers remarkable improvement over previous versions – new language improvements as part of C# 9 and F# 5 (including better functional programming and interactive programming), reduced P95 latency, enhanced Json serialization, and improved options of application deployment. Also, it brings enhanced performance and experience in the areas of Garbage Collection (GC), System.Text.Json, System.Text.RegularExpressions, Async ValueTask pooling and Container size optimizations, among many others. Some of the mentionable new features that are important for developers looking to collaborate on .NET are as follows.

New Features Introduced

  • C# – Improvements include extension of pattern matching capabilities to relational operators for comparative evaluations and expressions and supporting record reference types with value-based equality semantics and non-destructive mutation by a new with expression. New features include omission of the main method as a means for accelerating adoption and learning of C#, and language constructs that expose the following intermediate language (IL) opcodes: ldftn and calli.
  • F# – With .NET 5.0 F# supports basic string interpolation just like the interpolated string in C#, and even JavaScript.. In addition to basic string interpolation, there is typed interpolation. With typed interpolation, a given type must match the format specifier.
  • Visual Basic – NET 5.0 offers no new language features for Visual Basic but includes improvements to support the Visual Basic Application Framework on .NET Core.
  • Text.Json – New features in and for System.Text.Json include preserve references and handle circular references, HttpClient and HttpContent extension methods, allow or write numbers in quotes, support immutable types and C# 9 Records, support non-public property accessors, support fields, conditionally ignore properties, support non-string-key dictionaries, allow custom converters to handle null, copy JsonSerializerOptions and create JsonSerializerOptions with web defaults.

Besides above mentioned, there are new features for single file apps, app trimming, Windows ARM64 and ARM64 intrinsic, and tooling support for dump debugging. Also, the runtime libraries are 80% annotated for nullable reference types.

What does it mean for Organizations?

As Microsoft moves to .NET 5, the movement is clearly not linear and thus could leave a lot of organizations confused and baffled. Let us have a brief look at what’s the deal with this major release and what it means from organizations using different versions of.NET framework. Till now you could choose between .NET Core and Framework, leveraging .NET Standard to make shared libraries between the two. Going forward, you can use .NET Framework only till your operating system supports.

The migration from .NET Core and Framework to .NET 5.0 is inevitable and requires companies to gear up and prepare for it. The downside to this move is that certain applications and functionalities have been deprecated keeping long term support in mind. For example, there will be no replacement of ASP.NET Web Forms, Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF). The upside is that it will be an open source and cross platform that will help you develop efficiently, increase market capture, and operate with lower risks. To make the migration process convenient, .NET 5.0 allows side-by-side installation of the new version without breaking existing apps. It also includes self-contained applications, which means .NET may not essentially need to be on the computer.

Prepping for the Transition

This big announcement needs companies to prepare for the shift in different ways depending on the different versions of .NET that their applications are currently using. Though Microsoft has made the upgrade absolutely free, organizations will need to spare man hours to make the transition to the latest version. They might even have to retrain the staff. It is assumed that developers using WCF and having interacted with Web API will likely need less training to learn Web API fully. Also, teams that are on ASP.NET MVC will pick up things more quickly as compared to teams still using ASP.NET Web Forms.

Obviously, a considerable amount of training for the staff will be required for a smooth transition and uninterrupted operations after it. Organizations must prepare for it by discussing the transition and everything it will entail with key stakeholders and prepare a migration schedule so that everyone’s on the same page about what and when will the transition take place. It is a big move so getting all developers aboard is critical for successful transition. Another thing that will go a long way is the .NET 5.0 Migration Guide.