.NET 6: Preview 6 focuses on web development

Microsoft has released the sixth preview of .NET 6 and is primarily targeting web development with the preview. Meanwhile, Preview 6 of Visual Studio 2022, which was released at the same time, offers a live preview of WPF applications.

The list of enhancements to the ASP.NET Core 6 Preview 6 web framework includes websocket connection compression, open API support for compact HTTP APIs introduced in Preview 4, and accessibility improvements for Blazor as well as interoperability optimizations between Blazor and JavaScript.

Additionally, Blazor components can now have required parameters [EditorRequired] while tag helpers for view components in ASP.NET Core MVC and Razor Pages are now allowed to have optional parameters that were not allowed before. Microsoft has updated the project template for Angular clients for ASP.NET Core to Angular 12.

In the Entity Framework Core Object-Relational Mapper (OR), Preview 6 offers the core class DbContext a new method ConfigureConventions() that developers can override to set global parameters for types. Microsoft calls the feature “Pre-Convention Template Setup”.

Previously, developers had to configure each use of a type in the model. In addition, the OR mapper now also supports 64-bit integer values ​​for key values ​​automatically generated by the database. SQLite driver implements new data types introduced in .NET 6 Preview 4 DateOnly and TimeOnly.

In the .NET SDK, the builder now offers better management of optional workloads with commands dotnet workload search, dotnet workload uninstall and dotnet workload repair in addition to existing commands install, list and update. In addition, .NET 6 finally moves to the second generation of the Crossgen tool, which in addition to the intermediate language also embeds machine code in the compilation in order to speed up the startup of a .NET application.

In the .NET Class Library, LDAP access works with classes in the namespace System.DirectoryServices.Protocols not only on Windows, but also on Linux and macOS with TLS transport encryption.

Overall, Microsoft manager Richard Lander describes the amount of innovation in .NET 6 Preview 6 in a blog post as “relatively small” and announces major improvements for Preview 7. In particular, the team Entity Framework mainline made a few more remarks to fill the gap. which still exists between the classic Entity Framework and the modern Entity Framework Core. The ASP.NET Core team also lists many open spots in the roadmap.

After Preview 7 in August, two release candidates are planned for September and October, before .NET 6 is finally released on November 9, 2021.

A new preview version is available alongside .NET 6 released by Visual Studio 2022. The highlight is the new live preview of WPF applications. The Hot Reload feature now also works outside the debugger (start with CTRL+F5) and for C++ apps.

XAML Live Preview for WPF Applications in Visual Studio 2022 Preview 2

For web developers, there’s finally a separate project model for apps that use JavaScript or TypeScript, but not ASP.NET Core. Microsoft has also integrated JavaScript and TypeScript testing into Visual Studio’s Text Explorer.


James S. Joseph