Microsoft Releases Final Release Candidate for ASP.NET Core 7

MMS Founder
MMS Alen Genzic

Article originally posted on InfoQ. Visit InfoQ

Microsoft released ASP.NET Core 7 Release Candidate 2, the final release candidate for .NET 7 on October 11th. This release includes improvements to output caching, further improvements to the dynamic authentication in Blazor feature introduced in RC1 and experimental WebAssembly multithreading support using Web Workers.

This version of ASP.NET introduces a new vary-by option and improves the OutputCachePolicyBuilder API.

In previous versions of .NET, the output cache would always vary by the host name, meaning output caches for host names pointing to the same application would be duplicated by default. The SetVaryByHost option now gives developers the ability to disable this feature:

builder.Services.AddOutputCache(options =>
{
    options.AddBasePolicy(builder => builder.SetVaryByHost(false));
}

The OutputCachePolicyBuilder now includes the option to instantiate an empty policy, not including the default policies, allowing you to customise your output cache from the ground up.

Blazor Dynamic authentication is improved by enabling developers to view detailed logs by adding this LogLevel to their configuration:

"Logging": {
    "LogLevel": {
        "Microsoft.AspNetCore.Components.WebAssembly.Authentication": "Debug"
    }
}

The WebAssembly wasm-experimental workload allows the use of multithreaded code by leveraging Web Workers.

Developers can now install the wasm-experimental workload and add the WasmEnableThreads property to the project file to enable the use of threading in their WebAssembly code. This feature is still in the experimental phase and Microsoft does not recommend using it in production. The full release of this feature is planned for .NET 8.

Microsoft principal engineer Aleksey Kliger’s GitHub repository contains a comprehensive example of the new Web Workers multithreading feature.

This final release candidate for .NET 7 before its official launch in November can be downloaded from the official site. Microsoft’s official announcement mentions that this release is suitable for use in production environments as well. The use of .NET 7.0 on Windows requires the Visual Studio 17.4 latest preview. On macOS, it needs the latest version of Visual Studio for Mac. The latest version of the C# Extension includes support for .NET 7 and C# 11 for Visual Studio code users.

Other notable features already available or confirmed to be in the official .NET 7 release coming in November include rate limiting, Generic Math, and regular-expression improvements. Further improvements planned for the full ASP.NET 7 release are available in the ASP.NET 7 roadmap. Additional features still under consideration for .NET 7 can be seen in the .NET 7 Planning GitHub milestone.

Note that the .NET 7 release is a Standard Support version of .NET, with support available for 18 months after release. The next Long-Term Support version will be .NET 8, with support times of 36 months. More information on this can be seen in the Support Lifecycle document.

With this release come new updates to the previous LTS versions. Version 6 upgrades to version 6.0.10 and version 3.1 upgrades to version 3.1.30.

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.