While 2020 was a rough year to get through for many, developers have been working overtime as the world turned to more of a digital one and finding more online solutions. In November 2020, Microsoft announced its official release of .NET 5.0 — the next release after .NET Core 3.0. — that is full of new features and performance improvements.
If you’re using .NET, you should be getting quite excited. This first release is Microsoft’s first release to unify .NET. There are many things your development team should know with this release and how to prepare for future releases after .NET 5.0.
What’s so good about it?
There are many exciting benefits that come along with .NET 5.0 that need to be highlighted and understood. The biggest add-on for .NET 5.0 is support for ARM64 Windows devices. With this release, testing wasn’t an afterthought. Microsoft’s team and community have hosted this on dot.net and Bing.com. Microsoft continues to work with ARM engineers to optimize its performance.
As previously mentioned, there is a unified platform vision for with .NET 5.0 and future releases. You will be able to use it targeting Windows, Linux, macOS, iOS, Android etc. There is an immense amount of value here with the ability to use one set of APIs, languages, and tools for a number of different application types whether they’re on a desktop, mobile or in the cloud.
With digital transformation being a huge focus for many industries, this is a big development. As your development team will be migrating many applications to the cloud and utilizing IoT, this will be a solution to bring everything together. One of the most significant goals of this release is that it will produce a single .NET runtime and framework that can be used everywhere with uniform runtime behaviors and developer experiences.
The setup isn’t going to be a pain either. Benchmark.NET is the new tool to measure .NET’s performance. This will make it easier to analyze throughput and code.
With every release, also comes the anxiety of “oh no, what did they do and what will change?” Sometimes, change isn’t always welcomed with open arms, but in this case…it should. Everything development teams have come to know and love about .NET Core is still there. The .NET Core is still open source and community-based, boasts a high performance with cross-platform implementation, and integrates with Visual Studio, Visual Studio for Mac, and Visual Studio Code.
So what’s changing? Developers will now have more choice on runtime experiences, Java interoperability is available on all platforms, Objective-C and Swift interoperability will be supported on various operation systems, CoreFX will also be extended to support static compilation of .NET, and have smaller footprints and support for more operating systems. From the start, .NET relied on a just-in-time (JIT) compiler in order to translate Intermediate Language (IL) code to optimized machine code. Since then, Microsoft has built a leading JIT-based managed runtime with very high throughput that allows for easy programming. The experience for most .NET 5 workloads will be using the JIT-based CoreCLR runtime.
All .NET 5 applications will utilize the CoreFX framework, so Microsoft is focusing on the places where CoreFX is not currently used (Xamarin and client-side Blazor workloads). All .NET 5 applications will also be built with the .NET command-line interface (CLI) to ensure that developers have a common command-line tooling across projects. If you’re not familiar, the .NET CLI is a cross-platform toolchain for developing, running, and publishing .NET applications.
Mono is the cross-platform implementation for .NET and runtime used as part of Xamarin. CoreCLR is the runtime used as part of .NET Core and especially for supporting cloud applications. With this release, there will be CoreCLR and Mono drop-in replacements for one another so developers have the option to choose either runtime.
Visual Basic, C#9 and F#5 are part of the .NET 5.0 release and included in the .NET 5.0 software development kit (SDK). While there’s not any language changes, there’s improvements to support Visual Basic Application Framework on .NET Core. .NET 5 will also come up with Ahead-of-Time (AoT) and JIT compilation models. While JIT has enhanced performance for server/desktop workloads and the development environment, AoT has a small footprint, speedy startup and uses less memory.
With .NET 5.0, there’s been several improvements including improving the garbage collection (GC)’s scalability on machines with higher core counts, reduce the amount of time it takes to suspend threads, avoid pricey memory resets, and optimize decommitting GC heap memory pages to name a few. These improvements fall under the category of general performance improvements that will be embraced by many .NET developers.
Where should we start?
One of the biggest goals for developers with the .NET 5.0 release is to target .NET Standard 2.0 and 2.1 when it’s available or migrating code to the target .NET Standard 2.0. Using this standard solves all code sharing problems for .NET developers across all platforms by providing a collection of APIs for various environments.
Developers should also know that right now, third-party libraries and NuGet packages are not available for .NET 5. Some .NET technologies are also not available such as ASP.NET Web Forms applications, ASP.NET Web Pages applications and Workflow-related services. The full list of technologies that are currently not available can be found here.
Windows developers will also need Visual Studio 16.8 or later and Mac users will need to use the latest version of Visual Studio for Mac.
Understanding all of the improvements and enhancements that come along with this groundbreaking release is critical for .NET developers, especially those not elaborated on here such as networking improvements and diagnostics.
The Future of .NET
One of the best things for new releases is for developers to provide feedback and suggestions for future releases. Providing this feedback is critical for individual use cases and projects. Provide feedback on design flaws, performance improvements, or missing features that should be added in future releases in the dotnet/core repo.
While .NET 5.0 is a noteworthy release for .NET developers, it’s not a long-term support (LTS) release. The .NET 6 release update will be the next LTS offering that is scheduled for November 2021. If you’re still in the process of getting your .NET team together for what’s to come, Aptude is your Microsoft Gold Partner resource for nearshore/onshore .NET developers. Click to explore our .NET capabilities.