top of page

What’s new in Microsoft .NET 6

Microsoft has printed the third preview of .NET 6, the subsequent technology of the corporate’s software program growth platform that may end the components of the .NET unification begun in .NET 5.

Due as a manufacturing launch in November, .NET 6 is about to ship enhancements for cloud, desktop, and cell apps. Preview 2 was printed March 11, following the preliminary preview that arrived February 17. Month-to-month previews are deliberate between now and the manufacturing launch, which shall be supported for 3 years. Every preview will ship on .NET 6 themes, epics, and user stories for creating server/cloud, desktop, IoT, and cell purposes.

Microsoft .NET 6 will combine capabilities for Android, iOS, and MacOS that at the moment reside within the Xamarin open supply cell .NET platform. Microsoft is also extending the Blazor shopper net app growth device, so builders can construct a hybrid shopper app that mixes net and native UIs for desktop and cell utilization. Blazor WebAssembly was the primary unified platform deliverable in .NET 5. Printed in November 2020, .NET 5 marked the start of unification and laid the groundwork for Xamarin builders to make use of the unified .NET platform when .NET arrived.

The .NET unification creates one .NET from the separate .NET Core, .NET Framework, and Xamarin/Mono applied sciences. Elements of .NET Framework already had moved to .NET Core; .NET 5 started the journey of mixing .NET Core and Mono/Xamarin on a base class library and toolchain.

Preview four is downloadable from Introduced Might 25 and prepared for actual world testing, Preview four establishes a strong base for the ultimate .NET 6 construct, having completed options and experiences. “Go stay” builds, that are supported in manufacturing, are anticipated in August.

.NET 6 Preview 4 features Hot Reload improvements, RyuJIT compiler and runtime performance boosts, and early builds of MAUI, the multi-platform UI support based on Xamarin.

In its bulletin on Preview 4, Microsoft cited eight themes for .NET 6:

  • Interesting to new builders and college students.

  • An incredible shopper growth expertise.

  • Being acknowledged as a compelling framework for constructing cloud native apps.

  • Delivering less complicated and extra predictable fashions for utilizing .NET with mission-critical apps and extra intently catering to the wants of huge enterprise and authorities clients.

  • Enhancing “internal loop” efficiency for .NET builders, with productiveness enhancements for construct efficiency, sizzling restart, and sizzling reload.

  • Rising the .NET ecosystem by means of elevated confidence, high quality, and help.

  • Enhancing startup and throughput utilizing runtime execution data.

  • Assembly developer expectations.

New options in Preview four embody:

  • Enhancements to Sizzling Reload, offering an expertise to make edits in supply code whereas the code is operating while not having to manually pause an app or hit a breakpoint. Developer productiveness is improved. With this launch, Sizzling Reload works for a lot of kinds of apps reminiscent of WPF, Home windows Types, WinUI, ASP.NET, Console Apps, and different frameworks on high of the CoreCLR runtime. The expertise is also to be dropped at WebAssembly, iOS, and Android apps that run on Mono at a later date.

  • Textual content.Json help for IAsyncEnumerable, enabling System.Textual content.Json (de)serialization with IAsyncEnumerable<T> objects. System.Textual content.Json now helps serializing IAsyncEnumerable<T> objects as JSON arrays.

  • The writeable JSON DOM characteristic as an easy and high-performance programming mannequin for Textual content.Json, offering an API to keep away from complexity of serialization and the standard value of a DOM.

  • Considerably improved FileStream efficiency on Home windows.

  • A LoggerMessageAttribute kind source-generates performant logging APIs.

  • Linq enhancements with new APIs.

  • RyuJIT compiler enhancements.

  • Enhanced date, time, and time zone help.

  • For IL (intermediate language) trimming, warnings are enabled by default. Trim warnings apprise builders about locations the place trimming could take away code that’s used at runtime.

  • Single-file utility publishing enhancements together with improved evaluation to permit for customized warnings.

  • Single-file bundles now help compression.

  • Constructed-in SDK model checking is supplied.

  • Crossgen2, to generate and optimize code through ahead-of-time compilation, is now enabled by default when publishing ReadyToRun photos.

Preview three, unveiled on April eight, featured the next additions and enhancements:

  • A brand new unsafe API, CollectionsMarshal.GetValueRef, makes updating struct values in dictionaries quicker. This API is meant for high-performance eventualities.

  • Interface casting performance has been improved by 16 p.c to 38 p.c, which is especially helpful for C# sample matching to and between interfaces.

  • Code technology has been improved in RyuJIT through a number of modifications, to make the method extra environment friendly or ensuing code run quicker.

  • Early help for .NET Sizzling Reload grew to become accessible for ASP.NET Core and Blazor initiatives utilizing dotnet watch. This was step one in a extra complete plan to deliver this expertise to all .NET builders, supporting desktop growth, cross-platform shopper eventualities in .NET MAUI (Multi-platform App UI), and extra.

Preview 2, printed March 17, featured API and library enhancements, runtime efficiency boosts, and early builds of .NET MAUI (Multi-platform App UI), which is a contemporary UI toolkit that builds upon Xamarin. Microsoft’s bulletin on Preview 2 additionally emphasised themes for the platform reminiscent of improving “inner loop” performance, i.e., optimizing the instruments and workflows used often and repeatedly by builders to replace, construct, and check their code. Sizzling reloads, for instance, will enhance developer productiveness by enabling code to be edited whereas an app is operating, even and not using a debugger connected. Runtime startup efficiency, utility fashions, the dotnet CLI, and MSBuild are additionally getting consideration as a part of the internal loops theme.

One other theme is bettering the shopper app growth expertise, together with a extra unified cell product for .NET. As a part of this effort, iOS, Android, and MacOS growth shall be built-in into the .NET SDK expertise and use .NET libraries. As well as, the Xamarin.Types cross-UI framework is evolving into .NET MAUI, which can enable builders to create apps for Android, Home windows, and MacOS from the identical codebase. Blazor apps will run natively on Home windows and MacOS through .NET MAUI.

Microsoft additionally touted the addition of APIs and enhancements to .NET libraries. For instance, JsonSerializer (System.Tex.Json) now helps the flexibility to disregard cycles when serializing an object graph, whereas PriorityQueue<TElement.TPriority> is a brand new assortment that allows the addition of recent gadgets with a price and a precedence. Preview 2 additionally introduced higher parsing of ordinary numeric codecs in addition to runtime and JIT enhancements.

Preview 1 launched Android and iOS as the primary two platforms supported in MAUI. Future previews will add MacOS and Home windows desktop help. Blazor, which is constructed on high of MAUI, depends on the UI stack for a local utility container and native utility container controls.

Resource: Medium, Alpesh Patel

The Tech Platform



bottom of page