The last week was an eventful one for the .NET community, with the release of the second preview for .NET 6, ASP.NET Core, and EF Core 6. InfoQ examined these and a number of smaller stories in the .NET ecosystem from the week of March 8th, 2021.
This week's highlight was the release of .NET 6 Preview 2. The new release includes improvements to the System.Text.JSON
API, the introduction of PriorityQueue
- a new collection that enables adding new items with a value and a priority - and early builds of .NET MAUI. This preview also features many performance improvements, and all of the .NET libraries are now compiled with Crossgen2 (the replacement of the crossgen tool that enables cross-compilation across operating systems and architectures). .NET 6 Preview 2 is part of the scheduled monthly previews until the final release (general availability) of .NET 6 in November. The development roadmap follows the publicly available themes, epics, and user stories, and the upcoming preview releases will contain features related to them.
There were also updates to ASP.NET Core in this preview release. The SignalR client package has been annotated for nullability, and the Razor compiler was updated to use C# source generators. According to Microsoft, this results in significantly faster build times (see graph below). Blazor's support for custom events is now expanded to support custom event arguments, allowing passing arbitrary data to .NET event handlers with custom events. CSS isolation is now supported with MVC views and Razor Pages (just by adding a .cshtml.css
file matching the name of the .cshtml
file).
Razor build time improvements. Source: Microsoft
Following the same release schedule as .NET 6, EF Core 6 Preview 2 was also released this week. The new release includes better integration with System.Linq.Async
and more flexible free-text search. When SaveChangesAsync
is called, the synchronization context is now preserved and calls to System.String.Concat
with multiple arguments now translated to SQL.
Another interesting release from Microsoft was Project Reunion 0.5 Preview. Project Reunion is a set of libraries, frameworks, components, and tools that provides a unified development platform for all apps (Win32, Packaged, and UWP), targeting all the Windows 10 versions. The new release also includes the first stable release of WinUI 3, the newest version of the native UI platform for Windows 10. Project Reunion 0.5 is a developer preview, and its first stable release (v1.0) will be generally available in October (expected).
Other relevant .NET updates include the end-of-life announcement for Blazor WebAssembly 3.2, released in May 2020. Microsoft advises that all apps using Blazor WebAssembly 3.2 should be updated to use .NET 5 to stay in support. Alpine 3.13 is now supported with the .NET Core 3.1.13 and .NET Core 2.1.26 update. Other reliability and security updates are also included in the .NET 5.04, 3.1.13, and 2.1.26 versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64.
Microsoft also released a security advisory this week related to a .NET Core remote execution vulnerability in .NET 5.0, .NET Core 3.1, and .NET Core 2.1. The vulnerability affects any .NET 5, .NET Core, or .NET Framework-based application that uses the System.Text.Encodings.Web
package with a vulnerable version (4.0.0 - 4.5.0, 4.6.0-4.7.1, and 5.0.0). The latest releases for the .NET versions (above) already include the secure versions for this package.
Richard Lander, program manager for the .NET team at Microsoft, also published a detailed use case on using Raspberry Pi, C#, and .NET GPIO APIs to control multiple blinking LEDs. Although not exactly being a release, the blog post is an in-depth demonstration of using .NET within the IoT ecosystem.
AutoWrapper 4.5.0 was also part of this week's releases. AutoWrapper.Core is a customizable HTTP response wrapper and exception handler for ASP.NET Core APIs. The new version includes bug fixes and new options for handling customization, including an option to set a collection of API paths and routes to be ignored.