Paul Krill
Editor at Large

.NET 10 Preview 5 highlights C# 14, runtime improvements

news
Jun 12, 20253 mins

The latest .NET preview release includes user-defined compound assignment operators for C# 14 and an extension to JIT compiler escape analysis in the .NET runtime.

A hand holds a photographer's lens looking out at a field at sunrise. Preview, new, viewing the horizon.
Credit: REDPIXEL.PL / Shutterstock

Microsoft has launched the fifth preview of its planned .NET 10 open source developer platform. The preview release fits C# 14 with user-defined compound assignment operators and enhances the .NET runtime with escape analysis, among other updates.

Announced June 10, .NET 10 Preview 5 can be downloaded from dotnet.microsoft.com. It includes enhancements to features ranging from the runtime and C# 14 to F# 10, NET MAUI, ASP.NET Core, and Blazor.

C# 14 type authors can now implement compound assignment operators in a user-defined manner that modifies the target in place rather than creating copies. Pre-existing code is unchanged and works the same as before. Meanwhile, in the .NET runtime, the JIT compiler’s escape analysis implementation has been extended to model delegate invokes. When compiling source code to IL (intermediate language), each delegate is transformed into a closure class with a method corresponding to the delegate’s definition and fields matching any captured variables. At runtime, a closure object is created to instantiate the captured variables along with a Func object to invoke the delegate. This runtime preview also enhances the JIT’s inlining policy to take better advantage of profile data. Additionally, F# 10 introduces scoped warning controls with a new #warnon directive supporting fine-grained control over compiler diagnostics.

A production release of .NET 10 is expected this November. .NET 10 Preview 5 follows Preview 4, announced May 13. The first preview was unveiled February 25, followed by a second preview on March 18, and the third preview, announced April 10. Other improvements featured in Preview 5 include:

  • For ASP.NET Core, developers now can specify a custom security descriptor for HTTP.sys request queues using a new RequestQueueSecurityDescriptor property on HttpSysOptions. This enables more granular control over access rights for the request queue, allowing developers to tailor security to an application’s needs.
  • The OpenAPI.NET library used in ASP.NET Core OpenAPI document generation has been upgraded to v2.0.0-preview18.
  • Blazor now provides an improved way to display a “not Found” page when navigating to a non-existent page. Developers can specify a page to render when NavigationManager.NotFound() is called by passing a page type to the Router component using the NotFoundPage parameter.
  • For .NET MAUI, projects now can combine XML namespaces into a new global namespace, xmlns="http://schemas.microsoft.com/dotnet/maui/global", and use these without prefixes.
  • For Windows Presentation Foundation, the release introduces a shorthand syntax for defining Grid.RowDefinitions and Grid.ColumnDefinitions in XAML, with support for XAML Hot Reload. Performance and code quality are also improved.
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