News
Microsoft Ships First .NET 10 Preview
Microsoft shipped .NET 10 Preview 1, introducing a raft of improvements and fixes across performance, libraries, and the developer experience.
The JIT compiler now optimizes array interface calls and enables stack allocation for small value type arrays, reducing heap usage. Enhanced cryptographic support includes improved certificate handling and direct PEM data reading. The new CompareOptions.NumericOrdering
improves string comparisons, and ZipArchive
sees performance and memory enhancements. ASP.NET Core adds OpenAPI 3.1 and YAML support, along with Blazor improvements like script asset handling and QuickGrid
enhancements. EF Core 10 refines LINQ-to-SQL translation and introduces batch size control for async updates. These updates collectively enhance .NET's efficiency, security, and usability for modern development.
"Today, we are excited to announce the first preview release of .NET 10!" said the company's James Montemagno, a Principal Lead Program Manager for Developer Community, in a Feb. 25 GitHub discussion post. "We just shipped our first preview release, adding to some major enhancements across the .NET Runtime, SDK, libraries, C#, ASP.NET Core, Blazor, .NET MAUI, and more."
The Preview 1 release follows the debut of .NET 9 last November, where the dev team focused on tooling such as .NET Aspire and AI, and those continue to be focus points, as the company also shipped .NET Aspire 9.1. It's an opinionated, cloud-ready stack for building resilient, observable, and configurable cloud-native applications with .NET. Microsoft said v9.1 focuses on "quality-of-life" fixes.
That seems to be the trend across the board as no new major features were announced. Here's a summary of what's new, from a company overview:
- Runtime Enhancements
- Array Interface Method Devirtualization: The JIT compiler now optimizes virtual calls on array interfaces, improving performance in array manipulations.
- Stack Allocation for Value Type Arrays: Small, fixed-size arrays of value types can now be stack-allocated, reducing heap allocations.
- AVX10.2 Support: Preliminary support for Advanced Vector Extensions (AVX) 10.2, targeting future x64 processors, though currently disabled by default.
- Library Updates
- Enhanced Certificate Handling: New
FindByThumbprint
method supports hash algorithms beyond SHA-1 for improved security.
- PEM Data Support: Developers can read PEM-encoded data directly from ASCII or UTF-8 encoded files.
- DateOnly Support in ISOWeek: The
ISOWeek
class now includes overloads that accept the DateOnly
type.
- String Normalization with Span: String normalization APIs now support spans for more efficient memory usage.
- Numeric String Comparison: New
CompareOptions.NumericOrdering
enables numerical ordering in string comparisons.
- TimeSpan Creation Simplified: A new
TimeSpan.FromMilliseconds
overload streamlines time interval definitions.
- ZipArchive Performance: Improved memory efficiency and performance for handling ZIP archives.
- OrderedDictionary Enhancements: New
TryAdd
and TryGetValue
overloads return the index of the entry.
- Left-Handed Matrix Transformations: APIs for creating left-handed transformation matrices benefit graphics and game developers.
- SDK Improvements
- Pruning Framework-Provided Package References: The SDK now supports removing unnecessary package references for cleaner project files and faster builds.
- ASP.NET Core Updates
- OpenAPI 3.1 Support: ASP.NET Core now generates OpenAPI 3.1 documents, aligning with the latest API standards.
- YAML Format for OpenAPI: Developers can generate OpenAPI documents in YAML format as an alternative to JSON.
- Blazor Enhancements: Updates include the
QuickGrid
component's RowClass
parameter and serving Blazor scripts as static web assets.
- Integration Testing Improvements: Enhanced support for testing applications using top-level statements.
- Entity Framework Core (EF Core) 10
- LINQ and SQL Translation Enhancements: Improved efficiency in LINQ queries and SQL translation.
- Async Update Support: The
ExecuteUpdateAsync
method now accepts a BatchSize
parameter for optimized batch updates.
More information can be found in the release notes.
About the Author
David Ramel is an editor and writer at Converge 360.