Microsoft last week released the second preview of .NET 11, bringing a wide range of improvements to its development platform. The release, covering updates to the runtime, SDK, libraries, ASP.NET Core, Blazor, .NET MAUI, F#, and more, is now available and represents a significant step forward in the platform’s ongoing development, according to Microsoft. This latest preview focuses on bolstering performance, enhancing developer tools, and integrating new features designed to streamline application development across various platforms.
A key enhancement in .NET 11 Preview 2 is the addition of native OpenTelemetry tracing support within ASP.NET Core. OpenTelemetry is an observability framework designed to provide insights into software performance and behavior. Previously, developers needed a separate instrumentation library to collect standard tracing data. Now, the framework automatically adds OpenTelemetry semantic attributes directly to HTTP server activity, including request method, URL path, response status code, and server address, simplifying the process of monitoring and debugging applications.
Blazor Enhancements for Improved User Experience
For developers working with Blazor, the preview introduces several notable improvements. Blazor Server-Side Rendering now supports TempData, a feature that allows data to persist across HTTP requests. This is particularly useful for implementing flash messages, redirect flows, and one-time notifications within Blazor applications. The feature is automatically registered and utilizes ASP.NET Core Data Protection for encryption by default, enhancing security.
To further optimize Blazor WebAssembly applications, a new dotnet new webworker project template has been introduced. This allows developers to offload computationally intensive tasks to a Web Worker, preventing the UI thread from being blocked and maintaining application responsiveness during demanding operations. This is a significant improvement for applications that require complex calculations or data processing.
Performance Gains and .NET MAUI Updates
Performance is a major focus of .NET 11 Preview 2. Kestrel, Microsoft’s cross-platform web server, has seen improvements to its HTTP/1.1 request parser. The rework avoids throwing exceptions on malformed requests, and Microsoft reports throughput improvements of 20 to 40 percent in scenarios involving high volumes of invalid traffic, such as port scanning or misconfigured clients. This enhancement contributes to a more robust and reliable web server experience.
The .NET MAUI (Multi-platform App UI) framework has also received considerable attention. Developers can now define map coordinates directly in XAML using a simplified syntax, eliminating the need for verbose markup previously required. A new Map.Region bindable property allows developers to set the map’s initial region declaratively. Map elements like polygons, polylines, and circles now support visibility toggling and draw-order control through new IsVisible and ZIndex properties, enabling more dynamic and interactive map overlays. Click events on these map elements are now supported on both Android and iOS, opening up possibilities for richer user interaction.
Improved Binding Performance in .NET MAUI
Significant improvements have been made to binding performance within .NET MAUI. TypedBinding and SourceGeneratedBinding are reported to be approximately 29 percent faster with 50 percent less memory allocation per operation. These gains are attributed to delegate caching, binding mode caching, and the removal of unnecessary type conversions. A long-standing bug affecting empty-string binding to nullable value types has also been resolved, ensuring that bound properties are correctly set to null when an input field is cleared.
F# Enhancements and Other Notable Changes
Beyond C#, .NET 11 Preview 2 brings several additions to the F# programming language. The language now supports the #elif preprocessor directive, simplifying conditional compilation. A new partitionWith function has been added across core collection types, allowing collections to be split into two groups based on different element types. A new overload resolution caching mechanism is reported to reduce type-checking time from 6.5 seconds to 2.9 seconds, and all 462 functions across core collection modules now include Big-O complexity notes visible directly in IDE tooltips, aiding developers in understanding the performance characteristics of their code.
Other changes in this release include a generic GetTypeInfo for System.Text.Json, tar archive format selection, and a 15 percent performance improvement to Matrix4x4.GetDeterminant. These smaller enhancements contribute to a more refined and efficient development experience across the .NET ecosystem.
The full release notes for .NET 11 Preview 2 are available on the official .NET blog and the dotnet GitHub repository. Microsoft plans to continue refining .NET 11 based on feedback from this and future previews.
The .NET 11 preview signals Microsoft’s continued commitment to improving developer productivity and application performance. The next preview release is expected to build upon these foundations, further solidifying .NET as a leading platform for building modern, cross-platform applications. Readers interested in exploring the latest features and providing feedback are encouraged to download the preview and engage with the .NET community.
What are your thoughts on the new features in .NET 11 Preview 2? Share your comments below.
