Technology

.NET 10 Preview 2: Discover the Game-Changing Updates You Can't Miss!

2025-03-25

Author: Emma

.NET 10 Preview 2 Unveiled

Last week, the .NET Team unveiled the highly anticipated second preview release of .NET 10, packed with transformative enhancements that will elevate various components, including .NET Runtime, SDK, libraries, C#, ASP.NET Core, Blazor, .NET MAUI, and more!

Key Features of the Update

One of the standout features of this update is the ReconnectModal component, designed specifically for Blazor Web App projects. This innovative UI component equips developers with increased control over the reconnecting process when clients lose their WebSocket connection, which can significantly improve user experience and reduce frustration.

The ReconnectModal comes with its own stylesheet and JavaScript files, ensuring it complies with strict Content Security Policy (CSP) settings. Now, developers can easily manage the state of reconnections thanks to new features like displaying retry states and emitting events to notify on state changes. This robust feature set makes a real difference for applications dependent on real-time updates.

Improved Navigation and User Experience

Additionally, the NavigateTo function has been revamped, allowing seamless navigation without the annoying scroll-to-top issue when switching to the same page. Imagine how much more enjoyable user interactions will be with this enhancement!

The NavLink component also sees improvements, now ignoring query strings and fragments when using NavLinkMatch.All, allowing for more precise control over how links behave. Meanwhile, a new method called CloseColumnOptionsAsync simplifies user interactions within the QuickGrid component, making UI development a breeze.

OpenAPI Enhancements

Continuing from the first preview, XML documentation comments can now be included in OpenAPI documents with ASP.NET Core, enriching API metadata significantly. This essential feature needs to be enabled in the project file and processed during build-time to take effect.

Developers should note that a significant upgrade to OpenAPI.NET v2.0.0-preview7 introduces several enhancements, including breaking changes to document transformers and other critical OpenAPI functions—be prepared to update your projects accordingly!

.NET MAUI Updates

In the realm of .NET MAUI, fresh features include the new ShadowTypeConverter, which allows for enhanced shadow styling using formatted strings for versatile visual designs. Additionally, the SpeechOptions API has been enhanced with a Rate property, giving developers new capabilities to control the playback speed for text-to-speech functionalities.

Not to be overlooked, a platform-specific update now enables modals to be displayed as popovers on iOS and Mac Catalyst, increasing developer control over modal presentations. The Switch control is also more versatile than ever, now enabling developers to set an OffColor alongside the existing OnColor options. Plus, the new InvokeJavascriptAsync method in the HybridWebView component streamlines JavaScript interactions within WebView controls like never before!

Entity Framework Core 10 Improvements

Enterprise developers will rejoice over the latest Entity Framework Core 10 additions, including support for the RightJoin operator—now you can perform right joins in your queries, perfectly complementing the previously added LeftJoin operator. Optimization enhancements have also been introduced for database root handling and internal processes, ensuring smoother performance.

WPF Enhancements

Moreover, WPF has been fine-tuned with performance improvements that boost UI automation, file dialogs, and pixel format conversions. Numerous bug fixes have been rolled out, particularly addressing issues with Fluent style components and other UI controls, resulting in a more reliable development experience.

C# 14 Features

Excitingly, C# 14 enriches the language with the inclusion of partial instance constructors and events, broadening the scope of partial members available. These pioneering features join previously introduced partial methods and properties, enhancing class implementation flexibility—especially useful when utilizing source generators.

Conclusion

This preview is genuinely groundbreaking, offering developers an unprecedented toolset to elevate their applications. What are you waiting for? Dive into .NET 10 Preview 2 today and revolutionize your development process!