November 9, 2020 // By Rockford Lhotka
You may have heard that Microsoft is launching .NET 5 this week. Are you ready? Let us tell you what to expect and how to prepare.
A Historical Timeline of .NET
When .NET 5 launches in November 2020, it will produce two runtimes: CoreCLR and mono. CoreCLR will extend .NET Core 3 to encompass the features of .NET Framework and mono; mono will continue to exist so developers can choose to target either it or CoreCLR.
Developers should be working to get as much of their code to target .NET Standard 2.0 as possible, as this is the path to achieve maximum portability and cross-platform flexibility.
In the .NET 5 timeframe there is just one framework: CoreFX. Microsoft has indicated that this framework will run on CoreCLR and mono. For most developers, CoreCLR will be their target, replacing today’s .NET Framework, .NET Core, and mono. However, mono remains a valid target runtime and will probably continue to be used in mobile, gaming, and some other less common operating environments.
You Can Still Use .NET Core
But don’t fret if you still want to use .NET Core capabilities. You will still be able to. CoreCLR is just the evolution of .NET Core, adding in features from mono and .NET Framework.
The goal is for CoreCLR to include the mono features that support mobile development today. It may be that this first iteration of .NET 5 will have CoreCLR achieving equality with mono, in which case the only improvement for mobile developers is that they’ll be able to use the same runtime as desktop/server developers. Or it might be that there are benefits to CoreCLR over mono, but that’s unknown today.
Prepare to Target .NET Standard 2.0
When it comes to code, the goal for developers will be to target .NET Standard 2.0, because that’s the common API definition for .NET Core, .NET Framework, and mono – today and into .NET 5. In other words, if you can get your code to .NET Standard 2.0 today, that code will build seamlessly on .NET 5.
For organizations coming from .NET Framework there are many opportunities, including cross-platform development, performance, reduced memory and deployment footprints, reduced startup times, simpler project files, and better support for team-based development. For organizations already using .NET Core and targeting .NET Standard 2.0, the opportunities are already here. However, life will be simpler for everyone when we no longer need to worry about the legacy .NET Framework, and when mono is an option rather than a requirement for Xamarin and WebAssembly development scenarios.
With each release of .NET Core, Microsoft has improved performance in various scenarios and this trend will likely continue. Additionally, .NET 5 will see CoreCLR embracing some key technologies from mono that reduce application startup time in some scenarios (such as iOS, games, and embedded devices).
Start Migrating Soon
You should develop a migration strategy for your existing code. It is important to understand that .NET Standard 2.0 is compatible with .NET Framework and .NET 5, and so any code you want to share between the two platforms should be migrated to .NET Standard 2.0. Your long-term strategy should be to migrate .NET Framework code to .NET 5, and the use of .NET Standard 2.0 can act as a bridge during that migration.
This is an exciting time as .NET 5 is the evolution of .NET Core and mono, bringing these two runtimes into near-parity, while also providing a roadmap for .NET Framework code to move forward into the future of .NET. Take advantage now!
Magenic is the digital technology consulting company built for speed. If your organization needs help preparing for .NET 5, Magenic can help get you ready in no time.