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 9 Preview 7 with New Features and Updates

Microsoft Releases .NET 9 Preview 7 with New Features and Updates

Last week, Microsoft unveiled the seventh preview of the .NET 9 framework, introducing a range of updates and features across its components, including .NET Runtime, SDK, libraries, C#, and frameworks like ASP.NET Core and .NET MAUI.

The stable version of the .NET 9 framework, is expected to be released later this year, and it is a Standard Term Support (STS) release that will be supported on multiple operating systems for 18 months, from November 12th, 2024, to May 12th, 2026

The runtime improvements in .NET 9 Preview 7 include several advanced features. ARM64 SVE support has been added, also and post-indexed addressing on ARM64 has been implemented, which may optimize performance and make the loop's code more cache-friendly.

This release introduced strength reduction in loops, a compiler optimization technique that replaces operations with faster, logically equivalent alternatives, potentially impacting loop execution. The update also includes object stack allocation for boxes and GC Dynamic Adaptation To Application Sizes (DATAS) is now enabled by default.

Regarding the DATS, the official release reveals the full .NET TechEmpower benchmark results, which interested readers can explore.

Furthermore, several key changes have been implemented in the latest update to .NET Libraries. The removal of BinaryFormatter has been completed. It is noted that the main reason is that BinaryFormatter is considered unsafe. Deserializers, whether binary or text, that allow input to dictate the objects created pose a potential security risk. Also, developers can now enumerate over ReadOnlySpan<char>.Split() segments, providing a new method for handling strings.

Compression APIs have been updated to use zlib-ng, which is expected to provide improved performance, and the new Guid.CreateVersion7 method supports creating GUIDs with a natural sort order, as reported, while much of the data remains random, some is reserved for timestamp-based data, which allows these values to maintain a natural sort order.

.NET 9 also introduces the Interlocked.CompareExchange method for additional types, there are now also overloaded for atomically working with bytesbyteshort, and ushort. AES-GCM and ChaChaPoly1305 encryption algorithms are now supported on iOS, tvOS, and MacCatalyst, potentially enhancing security on these platforms.

Furthermore, updates have been made to X.509 Certificate Loading, and support for XPS documents has been added from the XPS virtual printer. Additionally, Tensor<T> has been marked as experimental, indicating ongoing development in data processing capabilities.

C# programming language has received updates in this release. The new OverloadResolutionPriority attribute allows API authors to specify the priority of overloads, which may guide developers in API usage. This attribute can be used with the ObsoleteAttribute to maintain backward compatibility while directing users away from outdated methods or properties.

ASP.NET Core in .NET 9 Preview 7 includes several updates, such as SignalR and Microsoft.AspNetCore.OpenApi now supports trimming and Native AOT, which may improve efficiency. Enhancements to transformer registration APIs now provide a variety of options for registering transformers.

Continuing, this release brings support for Pushed Authorization Requests in OpenIdConnectHandler and updates to Kestrel, the web server for ASP.NET Core, which aim to improve connection metrics by adding metadata about why a connection failed, provide more customization options for named pipe endpoints, and many more.

With Preview 7, .NET MAUI received a decent amount of new features, including the HybridWebView and a new TitleBar control for Windows. Updates to CollectionView and CarouselView on iOS and Mac Catalyst have been made, and developers can now bring a window to the foreground using the ActivateWindow method.

Other .NET MAUI updates include new lifecycle methods for remote notifications on iOS and Mac Catalyst, native Embedding improvements, Xcode Sync support for CLI and Visual Studio Code.

Interested readers can find more information about this version in the official release notes. Lastly, the .NET 9 Preview 7 download is available for Linux, macOS, and Windows. 

About the Author

Rate this Article

Adoption
Style

BT