At the end of February, .NET 10 Preview 1 was released, bringing several major updates and improvements across the platform. This first preview introduces enhancements to the .NET Runtime, SDK, libraries, C#, ASP.NET Core, Blazor, .NET MAUI, and more.
ASP.NET Core in .NET 10 now supports OpenAPI 3.1. This allows developers to generate OpenAPI documents with better integration for JSON Schema draft 2020-12. The release also introduces a simplified method for configuring OpenAPI versions. However, there are breaking changes that require updates to applications using document transformers.
Another noteworthy improvement is the ability to serve OpenAPI documents in YAML format. This provides a more concise alternative to JSON, helping developers manage longer descriptions more efficiently.
Regarding the future of this support, the .NET team states the following:
Support for YAML is currently only available when served at runtime from the OpenAPI endpoint. Support for generating OpenAPI documents in YAML format at build time will be added in a future preview.
Additional updates include response descriptions for ProducesResponseType, and URL validation with RedirectHttpResult.IsLocalUrl, and improved integration testing for applications using top-level statements.
Moving on to Blazor, QuickGrid now includes a RowClass parameter for conditional styling. Additionally, Blazor scripts are now served as static web assets with improved precompression. This change significantly reduces file sizes, offering a more efficient experience for developers.
As reported, .NET MAUI Preview 1 focuses on quality improvements for iOS, Mac Catalyst, Android, and other platforms. Notably, CollectionView handlers for iOS and Mac Catalyst are now enabled by default, improving both performance and stability.
The release also brings support for Android 16 (Baklava) Beta 1. It introduces new recommendations for the minimum supported Android API, now set to API 24. Additionally, JDK-21 support has been added. .NET Android projects can now run using the dotnet run command, simplifying the development process. Trimmer warnings are enabled by default for iOS, macOS, and tvOS applications, prompting developers to address potential trimming issues in their code.
On the database side, Entity Framework Core 10 Preview 1 introduces several new features. First, there is first-class LINQ support for the LeftJoin operator, simplifying queries that previously required complex LINQ constructs. The release also makes working with ExecuteUpdateAsync easier by supporting regular non-expression lambdas.
Other optimizations include improvements to SQL Server scaffolding, date/time function translation, and performance for Count operations on ICollection<T>. Additionally, smaller improvements address optimizations for MIN/MAX over DISTINCT and better handling of multiple consecutive LIMIT operations.
In C# 14, several new features have been added. One of the key updates is support for field-backed properties, providing a smoother path for developers transitioning from auto-implemented to custom properties. The nameof expression now supports unbound generics. Implicit conversions for Span<T> and ReadOnlySpan<T> also make working with these types more intuitive.
Moreover, lambda expressions can now include parameter modifiers like ref and in without specifying types. An experimental feature allows developers to change how string literals are emitted into PE files, offering potential performance benefits. Stating the following:
By turning on the feature flag, string literals (where possible) are emitted as UTF-8 data into a different section of the PE file without a data limit. The emit format is similar to explicit UTF-8 string literals.
Lastly, the .NET Team called on viewers to watch an unboxing video where they discussed what was new in the preview release, featuring live demos from the dev team. The video is now available to watch on demand and for a complete overview, readers can explore the full release notes and dive into additional details about the first preview of .NET 10.