You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/whats-new/dotnet-10/libraries.md
+68-3Lines changed: 68 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
title: What's new in .NET libraries for .NET 10
3
3
description: Learn about the new .NET libraries features introduced in .NET 10.
4
4
titleSuffix: ""
5
-
ms.date: 03/18/2025
5
+
ms.date: 04/09/2025
6
6
ms.topic: whats-new
7
7
ai-usage: ai-assisted
8
8
---
9
9
10
10
# What's new in .NET libraries for .NET 10
11
11
12
-
This article describes new features in the .NET libraries for .NET 10. It's updated for Preview 2.
12
+
This article describes new features in the .NET libraries for .NET 10. It's updated for Preview 3.
13
13
14
14
## Find certificates by thumbprints other than SHA-1
15
15
@@ -133,7 +133,7 @@ When you use source generators for JSON serialization, the generated context thr
133
133
134
134
## More left-handed matrix transformation methods
135
135
136
-
.NET 10 adds the remaining APIs for creating left-handed transformation matrices for billboard and constrained-billboard matrices. You can use these methods like their existing right-handed counterparts [add xrefs to the existing counterparts] when using a left-handed coordinate system instead.
136
+
.NET 10 adds the remaining APIs for creating left-handed transformation matrices for billboard and constrained-billboard matrices. You can use these methods like their existing right-handed counterparts <xref:System.Numerics.Matrix4x4.CreateBillboard(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3)> and <xref:System.Numerics.Matrix4x4.CreateConstrainedBillboard(System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3,System.Numerics.Vector3)> when using a left-handed coordinate system instead.
137
137
138
138
```csharp
139
139
publicpartialstructMatrix4x4
@@ -150,3 +150,68 @@ The new `ExportPkcs12` <!--TODO: add xref --> methods on <xref:System.Security.C
## New AOT-safe constructor for `ValidationContext`
155
+
156
+
The <xref:System.ComponentModel.DataAnnotations.ValidationContext> class, usedduringoptionsvalidation, nowincludesanewconstructorthatexplicitlyacceptsthe `displayName` parameter. ThisensuresAOTsafety, allowingitsuseinnativebuildswithoutwarnings:
157
+
158
+
```csharp
159
+
publicsealedclassValidationContext
160
+
{
161
+
publicValidationContext(objectinstance,
162
+
stringdisplayName,
163
+
IServiceProvider? serviceProvider=null,
164
+
IDictionary<object, object?>? items=null);
165
+
}
166
+
```
167
+
168
+
## Support for telemetry schema URLs in `ActivitySource` and `Meter`
169
+
170
+
<xref:System.Diagnostics.ActivitySource> and <xref:System.Diagnostics.Metrics.Meter> now support specifying a telemetry schema URL during construction, aligning with OpenTelemetry specifications. This ensures consistency and compatibility for tracing and metrics data. Additionally, the update introduces `ActivitySourceOptions`, simplifying the creation of <xref:System.Diagnostics.ActivitySource> instances with multiple configuration options.
The <xref:Microsoft.ML.Tokenizers.BpeTokenizer> now supports byte-level encoding, enabling compatibility with models like DeepSeek. This enhancement processes vocabulary as UTF-8 bytes. In addition, the new `BpeOptions` type simplifies tokenizer configuration.
## Deterministic option for LightGBM trainer in ML.NET
204
+
205
+
LightGBM trainers now expose options for deterministic training, ensuring consistent results with the same data and random seed. These options include `deterministic`, `force_row_wise`, and `force_col_wise`.
The <xref:System.Numerics.Tensors.Tensor> class now includes a nongeneric interface for operations like accessing `Lengths` and `Strides`. Slice operations no longer copy data, improving performance. Additionally, data can be accessed nongenerically by boxing to `object` when performance isn't critical.
Copy file name to clipboardExpand all lines: docs/core/whats-new/dotnet-10/overview.md
+37-7Lines changed: 37 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
title: What's new in .NET 10
3
3
description: Learn about the new features introduced in .NET 10 for the runtime, libraries, and SDK. Also find links to what's new in other areas, such as ASP.NET Core.
4
4
titleSuffix: ""
5
-
ms.date: 03/18/2025
5
+
ms.date: 04/09/2025
6
6
ms.topic: whats-new
7
7
ai-usage: ai-assisted
8
8
---
9
9
10
10
# What's new in .NET 10
11
11
12
-
Learn about the new features in .NET 10 and find links to further documentation. This page is updated for Preview 2.
12
+
Learn about the new features in .NET 10 and find links to further documentation. This page is updated for Preview 3.
13
13
14
14
.NET 10, the successor to [.NET 9](../dotnet-9/overview.md), is [supported for three years](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) as a long-term support (LTS) release. You can [download .NET 10 here](https://get.dot.net/10).
15
15
@@ -82,13 +82,21 @@ The ASP.NET Core 10.0 release introduces several new features and enhancements,
82
82
-**Minimal APIs**:
83
83
- Improved integration testing for apps using top-level statements.
84
84
- Empty strings in form posts are now treated as `null` for nullable value types.
85
+
- Built-in validation support for query, header, route parameters, and request bodies, with customizable behavior.
85
86
86
87
-**Authentication and authorization**:
87
88
- Added new metrics for authentication and authorization events.
88
89
89
90
-**Miscellaneous**:
90
91
- Added the `RedirectHttpResult.IsLocalUrl` helper method for detecting local URLs.
91
92
- Added support for route syntax highlighting in the <xref:Microsoft.AspNetCore.Components.RouteAttribute>.
93
+
- New `TypedResults.ServerSentEvents` API for streaming event messages to clients in minimal APIs and controller-based apps.
94
+
- Declarative state persistence simplifies state persistence in components and services during prerendering using the `SupplyParameterFromPersistentComponentState` attribute.
95
+
- Standalone Blazor WebAssembly apps now support referencing fingerprinted static web assets and import maps.
96
+
-<xref:System.Net.Http.HttpClient> response streaming is enabled by default on WebAssembly, improving performance and reducing memory usage for large responses.
97
+
- The app context switch `DisableMatchAllIgnoresLeftUriPart` is now renamed to `EnableMatchAllForQueryStringAndFragment`.
98
+
- Specify the environment for standalone Blazor WebAssembly apps at build time using the `<WasmApplicationEnvironmentName>` property.
99
+
- The ASP.NET Core Web API (native AOT) template now includes OpenAPI support by default.
92
100
93
101
For more information, see [What's new in ASP.NET Core for .NET 10](/aspnet/core/release-notes/aspnetcore-10.0).
94
102
@@ -102,6 +110,8 @@ C# 14 introduces several new features and enhancements to improve developer prod
102
110
-**Modifiers on simple lambda parameters**: Allows parameter modifiers like `ref`, `in`, or `out` in lambda expressions without specifying parameter types.
103
111
-**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.
104
112
-**Partial events and constructors**: Adds support for partial instance constructors and partial events, complementing partial methods and properties introduced in C# 13.
113
+
-**Extension members**: Extension methods now support static methods, instance properties, and static properties through `extension` blocks, enabling more flexible and powerful extensions.
114
+
-**Null-conditional assignment**: Simplifies conditional assignments by allowing properties or fields to be updated only if the containing instance exists, using the `?.` operator.
105
115
106
116
For more information, see [What's new in C# 14](../../../csharp/whats-new/csharp-14.md).
107
117
@@ -116,10 +126,19 @@ The .NET MAUI updates in .NET 10 include several new features and quality improv
116
126
- Added `Switch.OffColor` for customizing the color of the `Switch` control when off.
117
127
- Added `SearchBar.SearchIconColor` for customizing the search icon color.
118
128
- New `HybridWebView.InvokeJavascriptAsync` method for invoking JavaScript without requiring generic arguments.
129
+
- Support for fullscreen video playback in `WebView` on Android when the `iframe` includes `allowfullscreen`.
130
+
- Added `Geolocation.IsEnabled` to check if geolocation services are enabled without requesting location details.
131
+
- A `CancellationToken` can now be passed to `WebAuthenticator.AuthenticateAsync` for programmatically canceling authentication.
119
132
120
133
-**Deprecations**:
121
134
- The `FontImageExtension` XAML markup extension is deprecated. Use `FontImageSource` instead.
122
135
-`MessagingCenter` is now internal. Replace it with `WeakReferenceMessenger` from the `CommunityToolkit.Mvvm` package.
136
+
- Deprecation of `ListView`, `Cell`, and `TableView`, which will be removed in a future release.
137
+
138
+
-**Performance improvements**:
139
+
- Property mapping improvements with new caching and optimized property application order, reducing race conditions and repetitive calls.
140
+
- CollectionView optimizations on iOS, eliminating `MeasureInvalidated` subscriptions and improving templated cell responsiveness.
141
+
- Optimized `Label` rendering for `FormattedString` on Windows, achieving a ~56% performance improvement.
123
142
124
143
-**.NET for Android**:
125
144
- Support for Android 16 (API-36) Beta 1.
@@ -132,6 +151,7 @@ The .NET MAUI updates in .NET 10 include several new features and quality improv
132
151
-**.NET for iOS, Mac Catalyst, macOS, tvOS**:
133
152
- Trimmer warnings are now enabled by default.
134
153
- Bundling of original resources in libraries is now opt-out.
154
+
- Support for Xcode 16.3 Release Candidate
135
155
136
156
For more information, see [What's new in .NET MAUI in .NET 10](/dotnet/maui/whats-new/dotnet-10).
137
157
@@ -152,10 +172,18 @@ The EF Core 10 release introduces several new features and improvements, includi
152
172
- Enhanced performance for `Count` operations on `ICollection<T>`.
153
173
- Optimized `MIN`/`MAX` operations over `DISTINCT`.
154
174
175
+
-**Improved experience with Azure Cosmos DB for NoSQL**:
176
+
- EF Core now materializes a default value for required properties when no data is present in the document, simplifying model evolution.
177
+
178
+
-**Small improvements**:
179
+
- Redacted inlined constants from logs when sensitive logging is off.
180
+
- Enhanced <xref:Microsoft.Data.Sqlite.SqliteConnection.LoadExtension(System.String,System.String)> to work correctly with `dotnet run` and libraries named with `lib*`.
181
+
155
182
-**Miscellaneous**:
156
183
- Simplified parameter names in SQL queries (for example, from `@__city_0` to `city`).
157
184
- Added translation for date/time functions using `DatePart.Microsecond` and `DatePart.Nanosecond`.
158
185
- Made SQL Server scaffolding compatible with Azure Data Explorer.
186
+
- Additional minor bug fixes and improvements.
159
187
160
188
For more information, see [What's new in EF Core for .NET 10](/ef/core/what-is-new/ef-core-10.0/whatsnew).
161
189
@@ -211,19 +239,21 @@ The WPF updates in .NET 10 include several performance improvements, Fluent styl
211
239
- Replaced data structures like `PartialList` with `ReadOnlyCollection` to enhance performance.
212
240
- Optimized UI automation and file dialog operations to minimize allocations.
213
241
- Improved pixel format conversion performance.
242
+
- Enhanced performance by optimizing cache operations and array handling.
243
+
- Migrated font collection loader to managed code.
214
244
215
245
-**Fluent style changes**:
216
246
- Updated the default style for `Label`.
217
247
- Fixed animation issues for `Expander` by adjusting a `KeyTime` value.
248
+
- Introduced new Fluent styles for controls, including `NavigationWindow`, `Frame`, `ToolBar`, `ResizeGrip`, `GroupBox`, `Hyperlink`, `GridSplitter`, and `Thumb`.
249
+
- Fixed elevation border brushes for various controls.
Copy file name to clipboardExpand all lines: docs/core/whats-new/dotnet-10/runtime.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
title: What's new in .NET 10 runtime
3
3
description: Learn about the new .NET features introduced in the .NET 10 runtime.
4
4
titleSuffix: ""
5
-
ms.date: 03/18/2025
5
+
ms.date: 04/09/2025
6
6
ms.topic: whats-new
7
7
ai-usage: ai-assisted
8
8
---
9
9
# What's new in the .NET 10 runtime
10
10
11
-
This article describes new features and performance improvements in the .NET runtime for .NET 10. It's updated for Preview 2.
11
+
This article describes new features and performance improvements in the .NET runtime for .NET 10. It's updated for Preview 3.
12
12
13
13
## Array interface method devirtualization
14
14
@@ -60,9 +60,9 @@ The JIT can now inline methods that become eligible for devirtualization due to
60
60
61
61
During inlining, the JIT now updates the type of temporary variables holding return values. If all return sites in a callee yield the same type, this precise type information is used to devirtualize subsequent calls. This enhancement complements the improvements in late devirtualization and array enumeration de-abstraction. For more information, see [dotnet/runtime #111948](https://github.com/dotnet/runtime/pull/111948).
62
62
63
-
## Stack allocation of arrays of value types
63
+
## Stack allocation of small arrays of value types
64
64
65
-
In .NET 9, the JIT gained the ability to allocate objects on the stack, when the object is guaranteed to not outlive its parent method. Not only does stack allocation reduce the number of objects the GC has to track, but it also unlocks other optimizations. For example, after an object is stack-allocated, the JIT can consider replacing it entirely with its scalar values. Because of this, stack allocation is key to reducing the abstraction penalty of reference types.
65
+
In .NET 9, the JIT gained the ability to allocate objects on the stack when the object is guaranteed to not outlive its parent method. Not only does stack allocation reduce the number of objects the GC has to track, but it also unlocks other optimizations. For example, after an object is stack-allocated, the JIT can consider replacing it entirely with its scalar values. Because of this, stack allocation is key to reducing the abstraction penalty of reference types.
66
66
67
67
In .NET 10, the JIT now stack-allocates small, fixed-sized arrays of value types that don't contain GC pointers when it can make the same lifetime guarantees described previously. Consider the following example:
68
68
@@ -83,6 +83,29 @@ static void Sum()
83
83
84
84
Because the JIT knows `numbers` is an array of only three integers at compile time, and it doesn't outlive a call to `Sum`, it allocates it on the stack.
85
85
86
+
## Stack allocation of small arrays of reference types
87
+
88
+
Building on the stack allocation improvements introduced in .NET 9, .NET 10 extends this optimization to small arrays of reference types. Previously, arrays of reference types were always allocated on the heap, even when their lifetime was scoped to a single method. Now, the JIT can stack-allocate such arrays when it determines that they don't outlive their creation context. For example:
89
+
90
+
```csharp
91
+
staticvoidPrint()
92
+
{
93
+
string[] words= {"Hello", "World!"};
94
+
foreach (varstrinwords)
95
+
{
96
+
Console.WriteLine(str);
97
+
}
98
+
}
99
+
```
100
+
101
+
In this example, the array `words` is now allocated on the stack, eliminating heap allocations entirely. This reduces GC pressure and improves performance.
102
+
103
+
## Improved code layout
104
+
105
+
The JIT compiler in .NET 10 introduces a new approach to organizing method code into basic blocks for better runtime performance. Previously, the JIT used a reverse postorder (RPO) traversal of the program's flowgraph as an initial layout, followed by iterative transformations. While effective, this approach had limitations in modeling the trade-offs between reducing branching and increasing hot code density.
106
+
107
+
In .NET 10, the JIT models the block reordering problem as a reduction of the asymmetric Travelling Salesman Problem and implements the 3-opt heuristic to find a near-optimal traversal. This optimization improves hot path density and reduces branch distances, resulting in better runtime performance. For more details, see [dotnet/runtime #107749](https://github.com/dotnet/runtime/issues/107749).
108
+
86
109
## AVX10.2 support
87
110
88
111
.NET 10 introduces support for the Advanced Vector Extensions (AVX) 10.2 for x64-based processors. The new intrinsics available in the <xref:System.Runtime.Intrinsics.X86.Avx10v2?displayProperty=fullName> class can be tested once capable hardware is available.
0 commit comments