A few weeks ago, on November 10th, .NET 5.0 was released. During the 10th edition of the .NET Conf conference, the details and possibilities of the new version of the framework were presented. In today’s post, I would like to introduce you to the most interesting things that appeared there.
.NET 5.0 General Availability
.NET 5 is the next version of .NET Core. Microsoft continues the journey of developing this platform. Their mission is based on willingness to give everyone access and the possibility for creating modern, cloud-based, Internet-connected applications on a variety of platforms. So what does the new version give in this aspect?
Single file applications
The purpose of this was to enable .NET Core apps to be published and distributed as a single executable. Applications which contains various different assemblies can be packaged into one executable. Additionally, you have the possibility to run components of the application directly from the bundle, without extraction to disk.
Smaller container images
Dockerfile creates and publishes an ASP.NET application. Previously, the layer between the ASP.NET image and the SDK image wasn’t shared. Even though the SDK image contained the ASP.NET bits. In .NET 5, the SDK is based on the ASP.NET image, which provides significant download savings. You can read more about it here.
Windows ARM64 Support
Another feature added in .NET 5 is Windows ARM64 support. Windows Forms, WPF and ASP.NET Core apps can be run on Windows ARM64 devices, such as the Surface Pro X. You can read more about it here.
Designers of the C# language introduced a lot of interesting changes and features in this version. C# 9 is a release of the language, which is focused on program simplicity and data immutability. Among other things, there appeared a new kind of types – Records or a feature called Top-level programs. More about the changes in C#, I am going to write in another blog post.
F# 5.0 language features
The new update of F# adds two new features: interpolated strings and open type declarations. More about that you can read here.
.NET 5 performance improvements
This issue arises with every new framework or its new version. Has there been any performance improvement in .NET 5? Definitely yes! One of them is +30% socket performance improvement on Linux over .NET Core 3.1 or JSON serialization performance improved +19% over .NET Core 3.1. The thorough analysis based on many examples you can read in the blog post by Stephen Toub, if you are curious about such information.
Upgrade project from .NET Core 3.1 to .NET 5.0
Changing the version of .NET projects is inevitable, so how to do it? Nothing hard! The first thing you need to do is update Visual Studio to 16.9 version. After that, you can move on to the next steps which I described in one of the previous blog posts.
As you can see, the new version brought a lot of changes. .NET 5.0 is another step forward in strengthening Microsoft’s technology position. I think the number of enthusiasts will grow thanks to this. I encourage you to subscribe dotNET channel on YouTube. Next webinars are already scheduled there, where details and interesting facts about .NET 5 will be discussed. Don’t miss it!