BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Releases .NET 11 Preview 6 With Language and Framework Updates

Microsoft Releases .NET 11 Preview 6 With Language and Framework Updates

Listen to this article -  0:00

During July updates, Microsoft has released .NET 11 Preview 6, an update that brings changes to the C# language, ASP.NET Core, .NET MAUI, and Entity Framework Core.

In the C# area, extension members now include indexers, allowing developers to add this[...] access to an existing type from an extension block. The feature completes the extension members work introduced in .NET 10, which previously covered only methods and properties. The release also advances union types, first shown in Preview 5.

The compiler support types now ship in the framework, so a union declaration compiles without hand-written boilerplate, and System.Text.Json serializes a union by writing its active case. Both features remain in preview and require the preview language version.

ASP.NET Core receives a wide set of additions. Minimal API validation now supports asynchronous validators end to end through new DataAnnotations types, and applications built with WebApplication.CreateBuilder automatically rejects unsafe cross-origin requests using the browser's Sec-Fetch-Site and Origin headers. The protection is enabled without configuration and works across Minimal APIs, MVC, Razor Pages, and Blazor, with a note that Blazor Web App projects no longer need to call app.UseAntiforgery().

Next, Blazor's Virtualize component can now open at a chosen item and scroll to any item on demand, and client startup behaviour can be configured from the server in C# rather than in JavaScript. The Blazor Gateway, the development host for standalone WebAssembly apps, can now forward calls to backend services through a built-in YARP reverse proxy, removing the need for CORS configuration.

Generated OpenAPI documents target version 3.2 by default, union types work as request bodies and return types across the stack, and a new [ShortCircuit] attribute lets an endpoint run immediately after routing. SignalR connections can also refresh authentication without dropping, and clients can cancel non-streaming hub invocations.

[ApiController]
[Route("robots.txt")]
[ShortCircuit]
public class RobotsController : ControllerBase
{
    [HttpGet]
    public IActionResult Get() => Content("User-agent: *\nDisallow:", "text/plain");
}

...

// For SignalR also

app.MapGet("/health", [ShortCircuit] () => "Healthy");

Regarding cross-platform development and .NET MAUI, the next-generation CollectionView reaches Windows with a handler built on WinUI's ItemsRepeater, and Shell on Android is re-implemented on standard MAUI handlers instead of legacy renderer classes.

Important notice is that Microsoft.Maui.Controls.Compatibility package is no longer built or shipped, a breaking change for projects that reference it directly. HybridWebView interop now uses a source generator, making it safe for trimmed and Native AOT applications, while Xcode 26.6 becomes the supported stable version for the Apple workloads.

Furthermore, Entity Framework Core adds translation of the FullJoin operator to SQL FULL OUTER JOIN, allows keys and indexes to traverse complex-type properties, and introduces an IsConstrained API for relationships that have no database constraint. The Azure Cosmos DB provider gains index configuration options, and Microsoft.Data.Sqlite now depends on the SQLite3 Multiple Ciphers bundle, giving applications built-in encryption.

Other changes in this release include stream adapters for memory and text, activity tracing rules, cross-lane vector operations, runtime-async performance work, JIT improvements, in-process crash report logging, and faster NativeAOT interface dispatch.

For interested readers, the full release notes for .NET 11 Preview 6 are available on the dotnet/core repository on GitHub.

About the Author

Rate this Article

Adoption
Style

BT