Paul Krill
Editor at Large

Microsoft .NET 9 previews C#, runtime, SDK improvements

news
Aug 19, 20243 mins

Microsoft .NET 9 Preview 7 also brings new features and enhancements to the ASP.NET Core web framework and .NET MAUI UI framework.

shutterstock 402603583 number nine 9 in gold sparkles over a blue background
Credit: ABB Photo / Shutterstock

Microsoft has released a seventh preview of its forthcoming .NET 9 software development platform, with enhancements to C# for API authors. The .NET runtime, SDK, and other areas also are improved.

Accessible from dotnet.microsoft.com, .NET 9 Preview 7 was unveiled August 15. .NET 9 is expected to be introduced as a production release in November, roughly a year after the current release, .NET 8.

For C#, the seventh preview introduces a new attribute, System.Runtime.CompilerServices.OverloadResolutionPriority, which can be used by API authors to adjust the relative priority of overloads within a single type. This serves as a means of steering API consumers to use specific APIs, even if these APIs normally would be considered ambiguous or otherwise not chosen by C# overload resolution rules, Microsoft said. 

For the .NET runtime, Microsoft introduces experimental support for the Scalable Vector Extension (SVE), a SIMD instruction set for ARM64 CPUs. Also for the runtime, a compiler optimization called a “strength reduction” has been introduced for loops. With this capability, the loop operation is replaced with a faster, logically equivalent operation, according to release notes. Also with .NET 9 Preview 7, the runtime now has Dynamic Adaptation to Application Sizes (DATAS) enabled by default.

With the SDK, container publishing improvements have been made for insecure registries and more consistent environment variables are offered for container publishing. The preview also offers the first release of workload sets, an SDK feature that gives users more control over the workloads they install and the cadence of change of those installed workloads.

Among the library improvements, the removal of BinaryFormatter is complete. The deserializer was removed because it was deemed unsafe. Also, the preview introduces the X509CertificateLoader class, which replaces a number of “content-sniffing” methods with a “one method, one purpose” design. In another change, the System.IO.Compression APIs now use zlb-ng, yielding more efficient and consistent processing across a wider array of hardware and operating systems.

Preview 7 also brings improvements to the ASP.NET Core web framework and the .NET MAUI (Multi-platform UI) cross-platform UI framework. For ASP.NET Core, developers now can take advantage of performance benefits using native AOT (ahead-of-time) compilation in apps that use SignalR for real-time web communications. There also are improvements to transformer registration APIs in Microsoft.AspNetCore.OpenAPI. New in .NET MAUI with Preview 7, HybridWebView enables hosting arbitrary HTML/JavaScript/CSS content in a WebView and enables communication between the code in the WebView (JavaScript) and the code that hosts the WebView (C#/.NET). There also are native embedding improvements that bring .NET MAUI controls into .NET for Android/iOS/MacCatalyst or WinUI applications, instead of an entire .NET MAUI application. And with Preview 7, this no longer requires the compatibility package.

Microsoft with .NET 9 previously has touted goals such as improving runtime performance and making it easier to integrate AI into applications. .NET 9 Preview 6, introduced July 15, emphasized capabilities such as code layout improvements.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author