Microsoft announced the new .NET 5 (future of .NET) in the Build 2019 conference. .NET 5 will be a single unified platform for building applications that run on all platforms (Windows, Linux) and devices (IoT, Mobile).
Suppose you are a .NET developer currently supporting enterprise applications developed in the .NET framework. In that case, you need to know how .NET 5 will affect your current enterprise applications in the long run. .NET 5 is based on .NET Standard, which means not every .NET framework feature will be available in .NET 5. Also, some technology stacks like web forms, WCF, and WWF are not porting into .NET 5. Here, we will look into the details of what is not covered in .NET 5 and the alternatives.
Technology stacks not coming to .NET 5
ASP.NET Web Forms
ASP.NET Web Forms will not be coming to .NET 5, and Microsoft is currently recommending moving to Blazor, an experimental project promoted to official recently. The other choices are Angular, React, and Vue SPA frameworks if you are good at JavaScript.
If you are currently using Asp.net MVC as a full sa tack web app, you can continue to use the same stack by using
Asp.net Core MVC or the new
Razor Pages introduced in .net core 2.0, which may look similar to asp.net web forms to quickly build web form applications without views and controllers rapidly, if you are developing modern web applications for enterprise, it's better to consider a single page application such as Blazor, Angular or React instead of a traditional web app for providing rich client-side functionality.
WCF (Windows Communication Foundation)
The announcement of "WCF is going to miss the .NET 5 train" surprised many, including me. There has been a lot of discussion on GitHub to bring back WCF into the .NET core, but Microsoft decided not to bring it because of their initial estimation that porting WCF into .NET Core would take three years. (source : DotNetRocks Podcast)
Microsoft recommends using gRPC as an alternative, a modern open-source high-performance RPC framework that can run in any environment. However, unlike WCF, gRPC cannot be hosted in IIS today because of HTTP/2 implementation of Moreover, HTTP.Sys does not support HTTP response trailing headers which gRPC relies on.
WWF (Windows Workflow Foundation)
Workflow Foundation is not getting ported into .NET Core. However, every enterprise application will have some workflow or BPM tools integrated with it. If you used WWF in your application, Microsoft recommends looking at the unofficial fork of WF runtime for porting into .NET Core.
Technology stacks that are coming to .NET 5
Winforms, WPF & UWP
Microsoft is bringing Windows Desktop Packs (WinForms, WPF, and UWP) to support desktop applications that only work on windows. I wouldn't expect anyone to use WinForms for any new development. However, this will help to port legacy winforms applications into .NET 5. This doesn't mean that .Net core architecture is changing. It will still be a cross-platform framework, but when you add desktop packs, it targets working only on windows. However, porting existing windows desktop applications into .Net core will give the additional benefit of
Core Runtime and API performance improvements and deployment flexibility.
What's Replaced
- EF Core - Entity Framework Core is replacing EF 6 in .Net Core Framework.
- Asp.net Core - Asp.net Core replaces Asp.net. Check the migration guide for porting the asp.net application into the asp.net core.
- ASP.NET Core MVC - ASP.NET Core MVC unified ASP.NET MVC and Web API. Check the migration guide for porting the asp.net MVC app into asp.net core mvc.
- MSIX - Microsoft's new packaging tool replaces the old MSI package installer for desktop applications.
- JsonDocument - New Json Document library from System.Text.Json.JsonDocument API to replace json.net. It is 2-3x times faster than old json.net.
A few other important things to highlight
C# 8.0 introduced many new language features, including Async Stream, Ranges, Nullable Reference Types, Pattern Matching, etc. However, they will be available only on .NET Core 3.0 and above, so it is not coming to Legacy .NET Framework or .NET Core 2.2, 2.1, 1.0. It indicates that ".NET Framework is dead and .NET Core is the future."
Suppose you are planning to port .NET Framework applications into .NET Core. In that case, you will have to analyze the APIs used in your project to see whether it is compatible. .NET Portability Analyzer is a tool that helps to analyze and determine how flexible your application is across .NET platforms.
Conclusion
As a .NET developer, I am happy to see the future of .NET and its direction. I no longer need to learn JavaScript for the SPA framework because
Blazor will do that. I no longer need to learn Python for machine learning because
ML.NET will do that. I no longer need to learn Android/Swift because
Xamarin will do that. If you know C#, now, you can develop an application that can run anywhere from IoT to Cloud. However, this change will affect many enterprise customers who have the product/framework based on WCF and Web Forms.