Things you should know about .NET 5
I know many of you are waiting for an LTS to jump in and upgrade your systems, but I think this time things are a bit different! First of all, the next LTS will be .NET 6 which is planned for November 2021, and secondly .NET 5 is already published two months ago as RC1. Actually, two release candidates of .NET 5 were published and tested by many before the actual release:
|Version||Release Date||End of Support|
|.NET 5 RC 2||October 13, 2020||November 10, 2020|
|.NET 5 RC 1||September 14, 2020||October 13, 2020|
In this post, we will go through some of the important things of .NET 5, things you should know before you jump in – and you should!
.NET release cadence
Before we go through this major release, let’s see the plan: Microsoft plans to publish new major releases of .NET on a regular cadence, enabling developers, the community, and businesses to plan their roadmaps. Starting with .NET 5, these releases will happen every November and every other release will be an LTS release.
LTS is an acronym for Long Term Support. LTS releases are supported for three years after the initial release.
Why .NET 5 and not .NET 4?
.NET 5.0 is the next major release of .NET Core following 3.1. Microsoft named this new release .NET 5.0 instead of .NET Core 4.0 for two reasons:
- Version numbers 4.x would create confusion with .NET Framework 4.x.
- “Core” is no longer needed to distinguish between which .NET supports what app or platform; .NET 5.0 supports more types of apps and more platforms than .NET Core or .NET Framework.
Dropping “Core” is not always true
.NET 5 is the one and only and this alone definitely clears the confusion, but that is not the case for ASP.NET and Entity Framework!
- ASP.NET Core upgrades to ASP.NET Core 5, to avoid confusion with ASP.NET MVC 5
- Entity Framework Core upgrades to Entity Framework Core 5, to avoid confusing it with Entity Framework 5
.NET 5.0 doesn’t replace .NET Framework
There are technologies in .NET Framework that there are no plans to port them to .NET 5, and the reason is, we now have better alternatives! Following a list of these technologies
|Web Forms||ASP.NET Core Blazor or Razor Pages|
|Windows Communication Foundation (WCF)||gRPC|
|Windows Workflow (WF)||Open-source CoreWF|
Although .NET 5.0 is the main implementation of .NET, the one and only for the future to come, .NET Framework 4.x will still be supported.
.NET 5.0 doesn’t replace .NET Standard
Easy to understand why I guess!
If you want to share code between .NET Framework and .NET 5 (or .NET Core) you still need to specify
netstandard2.0 as your TFM.
If older support is not in your plans though, new application development can specify the
net5.0 target framework moniker (TFM) for all project types, including class libraries. Sharing code between .NET 5 workloads is simplified in that all you need is the
For .NET 5.0 apps and libraries, the
net5.0Target Framework Moniker (TFM) combines and replaces the
What’s new at a glance
Let’s take a short look of what is new in this first release of the future of .NET. In a future post we will go through these changes one by one and check all the details necessary.
- C# updates
- F# updates
- Visual Basic updates
- System.Text.Json new features
- Single file apps
- App trimming
- Windows ARM64 and ARM64 intrinsics
- Tooling support for dump debugging
- The runtime libraries are 80% annotated for nullable reference types
- Performance improvements:
- Garbage Collection (GC)
- Async ValueTask pooling
- Container size optimizations
- And many more..!
Are you ready for the change?
.NET 5.0 is the one and only, the one to rule them all and this is just a step in a transition to the new .NET that started 3-4 years ago with .NET Core 1. It’s not going to be fast, especially for some huge Web Forms apps out there, but we have a clear way ahead!