.NET 6 Preview 4 Released

Preview 4 establishes a solid base for delivering the final .NET 6.

Recently, Microsoft announced the release of .NET 6 Preview 4. This release is about half-way through the final .NET 6 release.

According to Microsoft Preview 4 establishes a solid base for delivering the final .NET 6 build in November, with finished features and experiences. The tech giant also revealed the date for the final release, i.e. November 9.

.NET 6 will be launched on the first day of .NET Conf 2021 with many in-depth talks and demos.

Source: Microsoft

.NET 6 Preview 4 features Hot Reload with the Visual Studio debugger and dotnet CLI. Hot Reload whihc is a new experience that enables users to make edits to their app’s source code while it is running without needing to manually pause the app or hit a breakpoint. Now, Hot Reload works for several kinds of apps like WPF, Windows Forms, WinUI, ASP.NET, Console Apps and other frameworks that are running on top of the CoreCLR runtime. 

The release also brings new enhancements that enable System.Text.Json (de)serialization with IAsyncEnumerable<T> objects. The writeable JSON DOM feature adds a new straightforward and high-performance programming model for System.Text.Json. This new API helps you avoids the complexity and ceremony of serialization and the traditional cost of a DOM.

.NET 6 introduces the LoggerMessageAttribute type, which is part of the Microsoft.Extensions.Logging namespace, and source-generates performant logging APIs. The source-generation logging support has been designed to provide a highly usable and highly performant logging solution for modern .NET applications. 

This Preview also features System.Linq enhancements. New System.LINQ APIs have been added that were requested by the community. The Enumerable.ElementAt method now accepts indices from the end of the enumerable. The TryGetNonEnumeratedCount method attempts to obtain the count of the source enumerable without forcing an enumeration. And new variants of the set operations allow specifying equality using key selector functions.

In .NET, 6 FileStream has been re-written to have much higher performance and reliability on Windows. Now, FileStream never blocks when created for async IO, on Windows. 

To learn more you can visit the official announcement here.

Next Recommended Reading .NET 5.0 Preview 2 Released