What's new in .NET 10
Learn about the new features in .NET 10 and find links to further documentation. This page is updated for Preview 2.
.NET 10, the successor to .NET 9, is supported for three years as a long-term support (LTS) release. You can download .NET 10 here.
Your feedback is important and appreciated. If you have questions or comments, use the discussion on GitHub.
.NET runtime
The .NET 10 runtime introduces new features and performance improvements. Key updates include:
- Array interface method devirtualization: The JIT can now devirtualize and inline array interface methods, improving performance for array enumerations.
- Array enumeration de-abstraction: Enhancements to reduce abstraction overhead for array iteration via enumerators, enabling better inlining and stack allocation.
- Inlining of late devirtualized methods: The JIT can now inline methods that become eligible for devirtualization due to previous inlining.
- Devirtualization based on inlining observations: The JIT uses precise type information from inlining to devirtualize subsequent calls.
- Stack allocation of arrays of value types: Small, fixed-sized arrays of value types without GC pointers can now be stack-allocated.
- AVX10.2 support: Introduced support for Advanced Vector Extensions (AVX) 10.2 for x64-based processors, though currently disabled by default.
- NativeAOT enhancements: Support for casting and negation in NativeAOT's type preinitializer.
For more information, see What's new in the .NET 10 runtime.
.NET libraries
The .NET 10 libraries introduce several new features and improvements, including:
- Find certificates by thumbprints other than SHA-1: A new method allows finding certificates using hash algorithms like SHA-256.
- Find PEM-encoded data in ASCII/UTF-8: PEM encoding APIs now support reading directly from ASCII/UTF-8 data.
- ISOWeek support for DateOnly: New overloads in the ISOWeek class support the DateOnly type.
- String normalization APIs for spans: New APIs allow Unicode string normalization to work with spans of characters, reducing allocations.
- Numeric ordering for string comparison: A new CompareOptions.NumericOrdering option enables numerical string comparisons.
- New TimeSpan.FromMilliseconds overload: A single-parameter overload resolves issues with LINQ expressions.
- ZipArchive performance improvements: Optimizations reduce memory usage and improve performance for ZipArchive in
Update
mode and parallel extraction. - OrderedDictionary enhancements: New
TryAdd
andTryGetValue
overloads return an index for fast access. - JSON serialization updates: Source generators now allow specifying
ReferenceHandler
in JsonSourceGenerationOptionsAttribute. - Left-handed matrix transformations: New APIs for creating left-handed transformation matrices.
- PKCS#12 export enhancements: New methods allow specifying encryption and digest algorithms for PKCS#12/PFX export.
For more information, see What's new in the .NET 10 libraries.
.NET SDK
The .NET 10 SDK introduces the following new features and enhancements, including:
- Pruning of framework-provided package references: Automatically removes unused framework-provided package references, reducing build times and disk usage.
- More consistent command order: New noun-first aliases for
dotnet
CLI commands improve readability and consistency.
For more information, see What's new in the SDK for .NET 10.
.NET Aspire
.NET Aspire releases version 9.1, which focuses on quality-of-life fixes.
For more information, see What's new in .NET Aspire 9.1.
ASP.NET Core
The ASP.NET Core 10.0 release introduces several new features and enhancements, including:
Blazor enhancements:
- Added the
ReconnectModal
component to the Blazor Web App project template for improved reconnection UI control. - The
NavigateTo
method no longer scrolls to the top for same-page navigation. - The
NavLink
component now ignores query strings and fragments when usingNavLinkMatch.All
. - Added the
RowClass
parameter toQuickGrid
for applying styles to rows based on their data. - Added the
CloseColumnOptionsAsync
method toQuickGrid
for programmatically closing column options. - Blazor framework script is now served as a static web asset with precompression and fingerprinting enabled.
- Added the
OpenAPI improvements:
- Added support for generating OpenAPI version 3.1 documents.
- Added support for serving OpenAPI documents in YAML format.
- Populated XML doc comments into OpenAPI documents.
Minimal APIs:
- Improved integration testing for apps using top-level statements.
- Empty strings in form posts are now treated as
null
for nullable value types.
Authentication and authorization:
- Added new metrics for authentication and authorization events.
Miscellaneous:
- Added the
RedirectHttpResult.IsLocalUrl
helper method for detecting local URLs. - Added support for route syntax highlighting in the RouteAttribute.
- Added the
For more information, see What's new in ASP.NET Core for .NET 10.
C# 14
C# 14 introduces several new features and enhancements to improve developer productivity and code quality. Key updates include:
- Field-backed properties: Provides a smoother path from auto-implemented properties to writing custom
get
andset
accessors. The compiler-generated backing field can now be accessed using thefield
contextual keyword. - Unbound generic support for
nameof
: Thenameof
expression now supports unbound generic types, such asList<>
, returning the name of the type without requiring type arguments. - Implicit span conversions: Introduces first-class support for
Span<T>
andReadOnlySpan<T>
with new implicit conversions, enabling more natural programming with these types. - Modifiers on simple lambda parameters: Allows parameter modifiers like
ref
,in
, orout
in lambda expressions without specifying parameter types. - Experimental feature - String literals in data section: Enables emitting string literals as UTF-8 data into a separate section of the PE file, improving efficiency for certain scenarios.
- Partial events and constructors: Adds support for partial instance constructors and partial events, complementing partial methods and properties introduced in C# 13.
For more information, see What's new in C# 14.
.NET MAUI
The .NET MAUI updates in .NET 10 include several new features and quality improvements for .NET MAUI, .NET for Android, and .NET for iOS, Mac Catalyst, macOS, and tvOS. Key updates include:
General improvements:
- New
ShadowTypeConverter
for converting formatted strings toShadow
onVisualElement
. - Added
SpeechOptions.Rate
for controlling the playback rate in Text-to-Speech. - Support for styling modals as popovers on iOS and Mac Catalyst.
- Added
Switch.OffColor
for customizing the color of theSwitch
control when off. - Added
SearchBar.SearchIconColor
for customizing the search icon color. - New
HybridWebView.InvokeJavascriptAsync
method for invoking JavaScript without requiring generic arguments.
- New
Deprecations:
- The
FontImageExtension
XAML markup extension is deprecated. UseFontImageSource
instead. MessagingCenter
is now internal. Replace it withWeakReferenceMessenger
from theCommunityToolkit.Mvvm
package.
- The
.NET for Android:
- Support for Android 16 (API-36) Beta 1.
- Updated recommended minimum supported Android API to 24 (Nougat).
- Support for building with JDK-21.
- Added support for
dotnet run
for Android projects. - Enabled marshal methods by default for improved startup performance.
- Design-time builds no longer invoke
aapt2
, reducing build times.
.NET for iOS, Mac Catalyst, macOS, tvOS:
- Trimmer warnings are now enabled by default.
- Bundling of original resources in libraries is now opt-out.
For more information, see What's new in .NET MAUI in .NET 10.
EF Core
The EF Core 10 release introduces several new features and improvements, including:
LINQ enhancements:
- Added support for the
LeftJoin
operator, simplifying LINQ queries that requireLEFT JOIN
operations. - Added support for the
RightJoin
operator, enabling LINQ queries that requireRIGHT JOIN
operations.
- Added support for the
ExecuteUpdateAsync improvements:
ExecuteUpdateAsync
now accepts a regular, non-expression lambda, reducing verbosity when updating entities.
Performance optimizations:
- Improved translation for
DateOnly.ToDateTime(timeOnly)
. - Optimized multiple consecutive
LIMIT
operations. - Enhanced performance for
Count
operations onICollection<T>
. - Optimized
MIN
/MAX
operations overDISTINCT
.
- Improved translation for
Miscellaneous:
- Simplified parameter names in SQL queries (for example, from
@__city_0
tocity
). - Added translation for date/time functions using
DatePart.Microsecond
andDatePart.Nanosecond
. - Made SQL Server scaffolding compatible with Azure Data Explorer.
- Simplified parameter names in SQL queries (for example, from
For more information, see What's new in EF Core for .NET 10.
F#
The F# updates in .NET 10 include several new features and improvements across the language, standard library, and compiler service. Key updates include:
F# Language:
- New language features require enabling the
<LangVersion>preview</LangVersion>
project property in.fsproj
files. These features become the default with the .NET 10 release.
- New language features require enabling the
FSharp.Core Standard Library:
- Changes to the
FSharp.Core
standard library are applied automatically to projects compiled with the new SDK unless a lowerFSharp.Core
version is explicitly pinned.
- Changes to the
FSharp.Compiler.Service:
- General improvements and bug fixes in the compiler implementation.
For more information, see the F# release notes.
Visual Basic
The Visual Basic updates in .NET 10 include the following features and enhancements:
unmanaged
constraint support: The Visual Basic compiler now interprets and enforces theunmanaged
generic constraint, enabling better compatibility with runtime APIs.- Honor overload resolution priority: The Visual Basic compiler respects the OverloadResolutionPriorityAttribute, ensuring faster Span-based overloads are preferred and resolving ambiguities among method overloads.
These updates ensure that Visual Basic can consume updated features in C# and the runtime, improving compatibility and performance.
For more information, see What's new in Visual Basic.
Windows Forms
Changes in Windows Forms for .NET 10 include:
Clipboard-related updates:
- Introduced new APIs for JSON serialization and type-safe data retrieval from the Clipboard, such as
SetDataAsJson<T>
andTryGetData<T>
. - Marked several Clipboard-related APIs as obsolete to warn developers about potential
BinaryFormatter
usage. - Added a configuration switch (
Windows.ClipboardDragDrop.EnableUnsafeBinaryFormatterSerialization
) to explicitly enableBinaryFormatter
for Clipboard scenarios. - Unified Clipboard code with WPF to enhance consistency and reliability.
- Introduced new APIs for JSON serialization and type-safe data retrieval from the Clipboard, such as
Ported UITypeEditors:
- Ported several
UITypeEditors
from the .NET Framework, includingToolStripCollectionEditor
and editors related to theDataGridView
control.
- Ported several
Quality enhancements:
- Expanded unit test coverage and addressed various bug fixes to improve stability and performance.
For more information, see What's new in Windows Forms for .NET 10.
WPF
The WPF updates in .NET 10 include several performance improvements, Fluent style changes, bug fixes, and engineering health updates:
Performance improvements:
- Replaced data structures like
PartialList
withReadOnlyCollection
to enhance performance. - Optimized UI automation and file dialog operations to minimize allocations.
- Improved pixel format conversion performance.
- Replaced data structures like
Fluent style changes:
- Updated the default style for
Label
. - Fixed animation issues for
Expander
by adjusting aKeyTime
value.
- Updated the default style for
Bug fixes:
- Resolved issues with UI element cursor types and crashes when bitmap streams are null.
- Fixed localization issues for
ScrollViewer
andContextMenu
. - Addressed minor bugs in
BitmapMetadata
and native dependencies.
Engineering health:
- Updated and synchronized MilCodeGen across WPF components.
- Removed deprecated .NET runtime references and unnecessary package dependencies.
- Conducted style cleanups and disabled code analysis for generated code to streamline builds.
For more information, see What's new in WPF in .NET 10.