.NET 5 Arrives
While it doesn't reflect the full vision of unification that Microsoft originally sought, the milestone .NET 5 release has arrived to consolidate many of the moving parts of the .NET ecosystem.
"There will be just one .NET going forward, and you will be able to use it to target Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly and more," Microsoft said last year in announcing .NET 5, which will be used for desktop, web, cloud, mobile, gaming, IoT and AI development.
.NET 5 consummates Microsoft's effort to move from the aging, proprietary, Windows-only .NET Framework that for nearly 20 years has come baked into Windows to a new open source, cross-platform direction that started with .NET Core, which paved the way for .NET 5.
When it originally unveiled the .NET 5 initiative, Microsoft said it aimed to improve .NET in these key ways:
- Produce a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences.
- Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin and Mono.
- Build that product out of a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios.
"We see a bright future ahead in which you can use the same .NET APIs and languages to target a broad range of application types, operating systems, and chip architectures," Microsoft said. "It will be easy to make changes to your build configuration to build your applications differently, in Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps or at the command line."
However, that bright future originally envisioned for .NET 5 was tarnished somewhat by technical problems and delays caused by the COVID-19 pandemic, which forced the company to shift priorities, not to mention moving all the dev teams to work-from-home arrangements.
Thus some features originally planned for .NET 5 were redirected to .NET 6, coming in November 2021.
"Last year, we laid out our vision for one .NET and .NET 5," said Scott Hunter, director of program management, .NET, in a May post published during the company's Build developer conference. "We said we would take .NET Core and Mono/Xamarin implementations and unify them into one base class library (BCL) and toolchain (SDK).
"In the wake of the global health pandemic, we've had to adapt to the changing needs of our customers and provide the support needed to assist with their smooth operations. Our efforts continue to be anchored in helping our customers address their most urgent needs. As a result, we expect these features to be available in preview by November 2020, but the unification will be truly completed with .NET 6, our Long-Term Support (LTS) release. Our vision hasn't changed, but our timeline has."
Also, unexpected technical problems slowed down some initiatives, including:
- Windows Presentation Foundation (WPF): In announcing Preview 8 of .NET 5, deemed to be feature complete, in August, Microsoft's Rich Lander, program manager for the .NET team, said "We've made the relatively late decision to delay the Windows Desktop component (Windows Forms, WPF).Windows Forms is near ready, but WPF is not, and we don't want to release only half the Windows Desktop component, in part because we don't test it in a split configuration. We hope to add the Windows Desktop component back as part of a 5.0 servicing update."
Also, Microsoft is retooling its WPF open source effort after a survey gathered negative feedback. As we reported in September, a new roadmap for the project said: "Our team's management has approved additional resourcing needs for this project. However, the global COVID-19 pandemic has caused hiring to be slower than usual. With the available resources on the current team, the roadmap above is what we are committed to getting scheduled and done in the foreseeable future. Stay tuned for schedule and/or investment updates as soon as we are able to actively expand resourcing for our team."
Windows Forms: As Lander mentioned above, this is another desktop component that ran into development delays, such as the "huge technical challenge" of duplicating the Winforms designer in the .NET Framework to .NET Core.
"For developers the .NET Core Windows Forms Designer (when we will release the GA version) will look and feel the same as the .NET Framework Windows Forms Designer," said Olia Gavrysh, program manager, .NET, in October. "But for us it is a huge technical challenge to bring the designer to .NET Core because it requires the design surface that hosts the live .NET Core form to run outside the Visual Studio process. That means we need to re-architect the way the designer surface 'communicates' with Visual Studio."
Work proceeded, however, and was almost done in time. In announcing the .NET 5 GA release, Microsoft noted that the WinForms designer was updated in Visual Studio 16.8 to support all Windows Forms controls, but "Data binding and support for a broader set of third-party controls is coming soon."
More information was provided in a post announcing Visual Studio 2019 v16.8. "We have improved performance in .NET 5 Windows Forms designer," Microsoft said. "The new architecture of the internal components significantly reduces memory allocations, which results in faster and more reliable designer work. The team has been working closely with third-party control vendors on the SDK for .NET 5 Windows Forms designer extensibility to allow control vendors to work with the new designer. Some of them already support .NET 5, but keep in mind others are coming soon!""
- Xamarin mobile: In September, while announcing how .NET 5 will basically subsume .NET Standard (defining a set of APIs that all .NET applications should support), Microsoft's Immo Landwerth acknowledged that the full unification story won't yet include Xamarin mobile tech. When a reader noted that .NET 5 is not the complete "one .NET" unification effort Microsoft originally envisioned, said, Lander said, "That is fair. This release has laid the technical foundation but we have deferred the convergence with mobile (Xamarin) to .NET 6."
Lander echoed that notion in his announcement of .NET 5 today (Nov. 10) during the start of the company's online .NET Conf 2020
".NET 5.0 is the first release in our .NET unification journey," Lander said. "We built .NET 5.0 to enable a much larger group of developers to migrate their .NET Framework code and apps to .NET 5.0. We've also done much of the early work in 5.0 so that Xamarin developers can use the unified .NET platform when we release .NET 6.0."
Xamarin.Forms will transition to project MAUI (.NET Multi-platform App UI) beginning with .NET 6.
As for what did make it into .NET 5, the list is exhaustive. Lander broke down the new goodies into several areas:
- Better performance: "Performance is greatly improved across many components and is described in detail at Performance Improvements in .NET 5.0, Arm64 Performance in .NET 5.0, and gRPC."
- New programming language support: "C# 9 and F# 5 offer new language improvements such as top-level programs and records for C# 9, while F# 5 offers interactive programming and a performance boost for functional programming on .NET."
- Library enhancements: ".NET libraries have enhanced performance for Json serialization, regular expressions, and HTTP (HTTP 1.1, HTTP/2). They are also are now completely annotated for nullability."
- P95 latency has dropped due to refinements in the GC, tiered compilation, and other areas.
- Application deployment options are better, with ClickOnce client app publishing, single-file apps, reduced container image size, and the addition of Server Core container images.
- Platform scope expanded with Windows Arm64 and WebAssembly.
Lander also noted how .NET is incomplete, now part of a two-step unification process that will include .NET 6 next year, as shown on this timeline:
"We had intended to deliver the entirety of the unification vision with .NET 5.0, but in the wake of the global pandemic, we had to adapt to the changing needs of our customers," Lander said. "We've been working with teams from companies from around the world that have needed help to speed up their adoption of cloud technologies. They, too, have had adapt to the changing needs of their customers. As a result, we are delivering the vision across two releases.
"The first step towards this vision was consolidating .NET repos, including a large subset of Mono. Having one repo for the runtime and libraries for .NET is a precondition to delivering the same product everywhere. It also helps with making broad changes that affect runtime and libraries, where there were previously repo boundaries. Some people were worried that a large repo would be harder to manage. That hasn't proven to be the case."
Microsoft today also penned blog posts about:
About the Author
David Ramel is an editor and writer for Converge360.