News

.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."

.NET 5
[Click on image for larger view.] .NET 5 (source: Microsoft).

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:

  • Blazor AOT: This highly requested ahead-of-time compilation feature -- promising massive speed gains -- had to be postponed to .NET 6. The client-side component of Blazor -- which allows for C# web development instead of JavaScript -- called Blazor WebAssembly trailed behind the server-side component from the outset due to technical challenges in working with the then-experimental WebAssembly technology. AOT has been identified as a sticking point for Microsoft, which published results of a survey indicating the lack of AOT was keeping developers from using .NET Core more.


  • 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."

    Windows Forms Designer
    [Click on image for larger view.] Windows Forms Designer (source: Microsoft).

    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."

    MAUI Overview
    [Click on image for larger view.] MAUI Overview (source: Microsoft).
    Xamarin.Forms will transition to project MAUI (.NET Multi-platform App UI) beginning with .NET 6.
    MAUI Compared to Xamarin.Forms
    [Click on image for larger view.] MAUI Compared to Xamarin.Forms (source: Microsoft).

As for what did make it into .NET 5, the list is exhaustive. Lander broke down the new goodies into several areas:

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:

The .NET Schedule
[Click on image for larger view.] The .NET Schedule (source: Microsoft).

"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.

comments powered by Disqus

Featured

Subscribe on YouTube