What’s new in Microsoft .NET 6

has published the second preview of .NET 6, the next generation of the company’s software development platform that will finish the parts of the .NET unification begun in .NET 5. Preview 2 features API and library improvements, runtime performance boosts, and early builds of .NET MAUI (Multi-platform App UI), which is a modern UI toolkit that builds upon Xamarin.

Due as a production release in November, .NET 6 is set to deliver improvements for cloud, desktop, and mobile apps. Preview 2 was published March 11, following the initial preview that arrived February 17. Monthly previews are planned between now and the production release, which will be supported for three years. Each preview will deliver on .NET 6 themes, epics, and user stories for developing server/cloud, desktop, IoT, and mobile applications.

Microsoft .NET 6 will integrate capabilities for Android, iOS, and MacOS that currently reside in the Xamarin open source mobile .NET platform. Microsoft also is extending the Blazor client web app development tool, so developers can build a hybrid client app that combines web and native UIs for desktop and mobile usage. Blazor WebAssembly was the first unified platform deliverable in .NET 5. Published in November 2020, .NET 5 marked the beginning of unification and laid the groundwork for Xamarin developers to use the unified .NET platform when .NET 6.0 arrived.

The .NET unification creates one .NET from the separate .NET Core, .NET Framework, and Xamarin/Mono technologies. Parts of .NET Framework already had moved to .NET Core; .NET 5 began the journey of combining .NET Core and Mono/Xamarin on a base class library and toolchain.

Microsoft’s bulletin on .NET 6 Preview 2 emphasizes themes for the platform such as improving “inner loop” performance, i.e., optimizing the tools and workflows used frequently and repeatedly by developers to update, build, and test their code. Hot reloads, for example, will improve developer productivity by enabling code to be edited while an app is running, even without a debugger attached. Runtime startup performance, application models, the dotnet CLI, and MSBuild are also getting attention as part of the inner loops theme.

Another theme is improving the client app development experience, including a more unified mobile product for .NET. As part of this effort, iOS, Android, and MacOS development will be integrated into the .NET SDK experience and use .NET libraries. In addition, the Xamarin.Forms cross-UI framework is evolving into .NET MAUI, which will allow developers to create apps for Android, Windows, and MacOS from the same codebase. Blazor apps will run natively on Windows and MacOS via .NET MAUI.

Microsoft also touted the addition of APIs and improvements to .NET libraries. For example, JsonSerializer (System.Tex.Json) now supports the ability to ignore cycles when serializing an object graph, while PriorityQueue is a new collection that enables the addition of new items with a value and a priority. Preview 2 also brings better parsing of standard numeric formats as well as runtime and JIT improvements.

Preview 1 of .NET 6 introduced Android and iOS as the first two platforms supported in MAUI. Future previews will add MacOS and Windows desktop support. Blazor, which is built on top of MAUI, relies on the UI stack for a native application container and native application container controls.

Also in the works in and around .NET 6:

  • To enable fast builds and faster operations for code changes as a standard feature of .NET, Microsoft is defining a new hot code reload model for all app types. Anchoring the effort is fast inner loop, a project supporting fast, iterative development. Part of the project entails enabling code edits to be applied to a live process without restarting, thus skipping a build.
  • For ARM64 hardware, .NET 6 will focus on functional enablement. On Windows, Preview 1 will support Windows Forms and Windows Presentation Framework. On the Mac, Preview 1 will add support for Apple Silicon (Arm64) chips.
  • Multiple efforts are afoot to improve containers in .NET 6, including improving scaling, reducing container size, and increasing startup and throughput performance.
  • The .NET thread pool has been reimplemented as a managed implementation and is now the default thread pool in .NET 6.
  • Microsoft aims to improve startup and runtime throughput in .NET 6 using runtime execution information. This will be done via Profile Guided Optimization (PGO), the beginnings of which are in Preview 1.
  • With .NET 6, single file apps have been enabled for Windows and MacOS. They had been limited to Linux in .NET 5.
You might also like

Comments are closed.