What’s New in .NET 9
Learn about the exciting new features in .NET 9, designed with a focus on cloud-native apps and performance. This release will be supported for 18 months as a standard-term support (STS) release.
.NET Runtime
- Feature Switches: A new attribute model with trimming support helps libraries to switch features on and off easily.
- Performance Enhancements:
— Loop optimizations
— Inlining improvements
— Profile-guided optimization (PGO) improvements
— Arm64 vectorization and code generation
— Faster exceptions and code layout
— Reduced address exposure
— AVX10v1 support
— Hardware intrinsic code generation
— Improved constant folding for floating-point and SIMD operations
.NET Libraries
- System.Text.Json: Customize JSON indentation character and size. New JsonSerializerOptions.Web singleton for web defaults.
- LINQ Enhancements: New methods, CountBy and AggregateBy, for aggregating state by key without intermediate groupings.
- Collections: New Remove method in System.Collections.Generic.PriorityQueue for updating item priority.
- Cryptography: One-shot hash method on CryptographicOperations and new classes using the KMAC algorithm.
- Reflection: PersistedAssemblyBuilder type to save emitted assemblies with PDB support.
- TimeSpan Class: New From* methods to create TimeSpan from int to avoid floating-point errors.
.NET SDK
- Unit Testing: Improved integration with MSBuild for parallel test runs.
- Tools: New option for dotnet tool install allowing users to decide tool runtime version compatibility. NuGet security audits for all package references.
- Terminal Logger: Enabled by default with improved usability and summary of failures and warnings.
- MSBuild: New script analyzers available.
ML.NET
- ML.NET 4.0: Added tokenizer support for models like Tiktoken, Llama, and CodeGen.
.NET Aspire
- Cloud-Ready Stack: .NET Aspire is an opinionated stack for building observable, production-ready, distributed applications. Available in preview.
ASP.NET Core
- Improvements: Enhancements to Blazor, SignalR, minimal APIs, OpenAPI, and authentication and authorization.
.NET MAUI
- Focus: Improving product quality and adding new features.
EF Core
- Updates: Significant updates to the database provider for Azure Cosmos DB for NoSQL, AOT compilation, and pre-compiled queries.
C# 13
- New Features:
— params collections
— New lock type and semantics
— New escape sequence (\e)
— Method group natural type improvements
— Implicit indexer access in object initializers
Windows Presentation Foundation (WPF)
- Support: Windows 11 theming and hyphen-based ligatures.
Explore these new features and enhance your development experience with .NET 9!