Skip to content

Commit 75fcd67

Browse files
CopilotBillWagnergewarren
authored
Update .NET 10 overview page for Preview 6 (#47428)
* Initial plan * Update .NET 10 overview page for Preview 6 with new features and current date Co-authored-by: BillWagner <[email protected]> * Remove preview version references from .NET 10 overview page Co-authored-by: gewarren <[email protected]> * Update additional .NET 10 what's new pages with current date and remove preview references Co-authored-by: BillWagner <[email protected]> * Add Preview 6 content to .NET 10 what's new pages for libraries, runtime, and SDK Co-authored-by: BillWagner <[email protected]> * Add links to file-based programs documentation in SDK what's new page Co-authored-by: BillWagner <[email protected]> * Address review feedback: update descriptions, fix links, add code examples, and reorganize runtime content Co-authored-by: gewarren <[email protected]> * Address review feedback: use contractions, spell out acronyms, simplify using statements, add missing link, and fix code fences Co-authored-by: BillWagner <[email protected]> * Apply suggestions from code review --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BillWagner <[email protected]> Co-authored-by: gewarren <[email protected]> Co-authored-by: Bill Wagner <[email protected]>
1 parent a6f277f commit 75fcd67

File tree

4 files changed

+307
-40
lines changed

4 files changed

+307
-40
lines changed

docs/core/whats-new/dotnet-10/libraries.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
title: What's new in .NET libraries for .NET 10
33
description: Learn about the updates to the .NET libraries for .NET 10.
44
titleSuffix: ""
5-
ms.date: 06/09/2025
5+
ms.date: 07/16/2025
66
ms.topic: whats-new
77
ai-usage: ai-assisted
88
---
99

1010
# What's new in .NET libraries for .NET 10
1111

12-
This article describes new features in the .NET libraries for .NET 10. It's updated for Preview 5.
12+
This article describes new features in the .NET libraries for .NET 10. It's been updated for Preview 6.
1313

1414
## Cryptography
1515

@@ -95,7 +95,23 @@ using (MLKem key = MLKem.GenerateKey(MLKemAlgorithm.MLKem768))
9595

9696
These algorithms all continue with the pattern of having a static `IsSupported` property to indicate if the algorithm is supported on the current system.
9797

98-
Currently, the PQC algorithms are only available on systems where the system cryptographic libraries are OpenSSL 3.5 (or newer). Windows CNG support will be added soon. Also, the new classes are all marked as [`[Experimental]`](../../../fundamentals/syslib-diagnostics/experimental-overview.md) under diagnostic `SYSLIB5006` until development is complete.
98+
.NET 10 includes Windows Cryptography API: Next Generation (CNG) support for Post-Quantum Cryptography (PQC), making these algorithms available on Windows systems with PQC support. For example:
99+
100+
```csharp
101+
using System;
102+
using System.IO;
103+
using System.Security.Cryptography;
104+
105+
private static bool ValidateMLDsaSignature(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, string publicKeyPath)
106+
{
107+
string publicKeyPem = File.ReadAllText(publicKeyPath);
108+
109+
using MLDsa key = MLDsa.ImportFromPem(publicKeyPem);
110+
return key.VerifyData(data, signature);
111+
}
112+
```
113+
114+
The PQC algorithms are available on systems where the system cryptographic libraries are OpenSSL 3.5 (or newer) or Windows CNG with PQC support. Also, the new classes are all marked as [`[Experimental]`](../../../fundamentals/syslib-diagnostics/experimental-overview.md) under diagnostic `SYSLIB5006` until development is complete.
99115

100116
## Globalization and date/time
101117

@@ -165,13 +181,49 @@ This new API is already used in <xref:System.Json.JsonObject> and improves the p
165181
## Serialization
166182

167183
- [Allow specifying ReferenceHandler in `JsonSourceGenerationOptions`](#allow-specifying-referencehandler-in-jsonsourcegenerationoptions)
184+
- [Option to disallow duplicate JSON properties](#option-to-disallow-duplicate-json-properties)
185+
- [Strict JSON serialization options](#strict-json-serialization-options)
168186

169187
### Allow specifying ReferenceHandler in `JsonSourceGenerationOptions`
170188

171189
When you use [source generators for JSON serialization](../../../standard/serialization/system-text-json/source-generation.md), the generated context throws when cycles are serialized or deserialized. Now you can customize this behavior by specifying the <xref:System.Text.Json.Serialization.ReferenceHandler> in the <xref:System.Text.Json.Serialization.JsonSourceGenerationOptionsAttribute>. Here's an example using `JsonKnownReferenceHandler.Preserve`:
172190

173191
:::code language="csharp" source="../snippets/dotnet-10/csharp/snippets.cs" id="snippet_selfReference":::
174192

193+
### Option to disallow duplicate JSON properties
194+
195+
The JSON specification doesn't specify how to handle duplicate properties when deserializing a JSON payload. This can lead to unexpected results and security vulnerabilities. .NET 10 introduces the <xref:System.Text.Json.JsonSerializerOptions.AllowDuplicateProperties?displayProperty=nameWithType> option to disallow duplicate JSON properties:
196+
197+
```csharp
198+
string json = """{ "Value": 1, "Value": -1 }""";
199+
Console.WriteLine(JsonSerializer.Deserialize<MyRecord>(json).Value); // -1
200+
201+
JsonSerializerOptions options = new() { AllowDuplicateProperties = false };
202+
JsonSerializer.Deserialize<MyRecord>(json, options); // throws JsonException
203+
JsonSerializer.Deserialize<JsonObject>(json, options); // throws JsonException
204+
JsonSerializer.Deserialize<Dictionary<string, int>>(json, options); // throws JsonException
205+
206+
JsonDocumentOptions docOptions = new() { AllowDuplicateProperties = false };
207+
JsonDocument.Parse(json, docOptions); // throws JsonException
208+
209+
record MyRecord(int Value);
210+
```
211+
212+
Duplicates are detected by checking if a value is assigned multiple times during deserialization, so it works as expected with other options like case-sensitivity and naming policy.
213+
214+
### Strict JSON serialization options
215+
216+
The JSON serializer accepts many options to customize serialization and deserialization, but the defaults might be too relaxed for some applications. .NET 10 adds a new <xref:System.Text.Json.JsonSerializerOptions.Strict?displayProperty=nameWithType> preset that follows best practices by including the following options:
217+
218+
- Applies the <xref:System.Text.Json.Serialization.JsonUnmappedMemberHandling.Disallow?displayProperty=nameWithType> policy.
219+
- Disables <xref:System.Text.Json.JsonSerializerOptions.AllowDuplicateProperties?displayProperty=nameWithType>.
220+
- Preserves case sensitive property binding.
221+
- Enables both <xref:System.Text.Json.JsonSerializerOptions.RespectNullableAnnotations?displayProperty=nameWithType> and <xref:System.Text.Json.JsonSerializerOptions.RespectRequiredConstructorParameters?displayProperty=nameWithType> settings.
222+
223+
These options are read-compatible with <xref:System.Text.Json.JsonSerializerOptions.Default?displayProperty=nameWithType> - an object serialized with <xref:System.Text.Json.JsonSerializerOptions.Default?displayProperty=nameWithType> can be deserialized with <xref:System.Text.Json.JsonSerializerOptions.Strict?displayProperty=nameWithType>.
224+
225+
For more information about JSON serialization, see [System.Text.Json overview](../../../standard/serialization/system-text-json/overview.md).
226+
175227
## System.Numerics
176228

177229
- [More left-handed matrix transformation methods](#more-left-handed-matrix-transformation-methods)

docs/core/whats-new/dotnet-10/overview.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,46 @@
22
title: What's new in .NET 10
33
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.
44
titleSuffix: ""
5-
ms.date: 06/09/2025
5+
ms.date: 07/16/2025
66
ms.topic: whats-new
77
ai-usage: ai-assisted
88
---
99

1010
# What's new in .NET 10
1111

12-
Learn about the new features in .NET 10 and find links to further documentation. This page is updated for Preview 5.
12+
Learn about the new features in .NET 10 and find links to further documentation. This page has been updated for Preview 6.
1313

1414
.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).
1515

1616
Your feedback is important and appreciated. If you have questions or comments, use the discussion on [GitHub](https://github.com/dotnet/core/discussions/categories/news).
1717

1818
## .NET runtime
1919

20-
The .NET 10 runtime introduces improvements in JIT inlining, method devirtualization, and stack allocations. It also includes AVX10.2 support and NativeAOT enhancements.
20+
The .NET 10 runtime introduces improvements in JIT inlining, method devirtualization, and stack allocations. It also includes AVX10.2 support, NativeAOT enhancements, improved code generation for struct arguments, and enhanced loop inversion for better optimization.
2121

2222
For more information, see [What's new in the .NET 10 runtime](runtime.md).
2323

2424
## .NET libraries
2525

26-
The .NET 10 libraries introduce new APIs in cryptography, globalization, numerics, serialization, collections, and diagnostics, and when working with ZIP files.
26+
The .NET 10 libraries introduce new APIs in cryptography, globalization, numerics, serialization, collections, and diagnostics, and when working with ZIP files. New JSON serialization options include disallowing duplicate properties and strict serialization settings. Post-quantum cryptography support has been expanded with Windows Cryptography API: Next Generation (CNG) support.
2727

2828
For more information, see [What's new in the .NET 10 libraries](libraries.md).
29+
For details on JSON serialization, see [System.Text.Json overview](/dotnet/standard/serialization/system-text-json/overview).
2930

3031
## .NET SDK
3132

32-
The .NET 10 SDK includes support for Microsoft.Testing.Platform in `dotnet test`, standardizes CLI command order, and updates the CLI to generate native tab-completion scripts for popular shells. For containers, console apps can natively create container images, and a new property lets you explicitly set the format of container images.
33+
The .NET 10 SDK includes support for [Microsoft.Testing.Platform](../../testing/microsoft-testing-platform-intro.md) in `dotnet test`, standardizes CLI command order, and updates the CLI to generate native tab-completion scripts for popular shells. For containers, console apps can natively create container images, and a new property lets you explicitly set the format of container images. The SDK also supports platform-specific .NET tools, one-shot tool execution with `dotnet tool exec`, the new `dnx` tool execution script, CLI introspection with `--cli-schema`, and enhanced file-based apps with publish support and native AOT.
3334

3435
For more information, see [What's new in the SDK for .NET 10](sdk.md).
36+
For details on .NET tools, see [Manage .NET tools](/dotnet/core/tools/global-tools).
3537

3638
## .NET Aspire
3739

3840
For information about what's new in .NET Aspire, see [.NET Aspire — what's new?](/dotnet/aspire/whats-new/).
3941

4042
## ASP.NET Core
4143

42-
The ASP.NET Core 10.0 release introduces several new features and enhancements, including Blazor improvements, OpenAPI enhancements, and minimal API updates.
44+
The ASP.NET Core 10.0 release introduces several new features and enhancements, including Blazor improvements, OpenAPI enhancements, and minimal API updates. Features include Blazor WebAssembly preloading, automatic memory pool eviction, enhanced form validation, improved diagnostics, and passkey support for Identity.
4345

4446
For details, see [What's new in ASP.NET Core for .NET 10](/aspnet/core/release-notes/aspnetcore-10.0).
4547

@@ -88,13 +90,13 @@ These updates ensure that Visual Basic can consume updated features in C# and th
8890

8991
## .NET MAUI
9092

91-
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.
93+
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. Features include MediaPicker enhancements for selecting multiple files and image compression, WebView request interception, and support for Android API levels 35 and 36.
9294

9395
For details, see [What's new in .NET MAUI in .NET 10](/dotnet/maui/whats-new/dotnet-10).
9496

9597
## EF Core
9698

97-
The EF Core 10 release introduces several new features and improvements, including LINQ enhancements, performance optimizations, and improved support for Azure Cosmos DB.
99+
The EF Core 10 release introduces several new features and improvements, including LINQ enhancements, performance optimizations, improved support for Azure Cosmos DB, and named query filters that allow multiple filters per entity type with selective disabling.
98100

99101
For details, see [What's new in EF Core for .NET 10](/ef/core/what-is-new/ef-core-10.0/whatsnew).
100102

0 commit comments

Comments
 (0)