diff --git a/.github/prompts/breaking-change.md b/.github/prompts/breaking-change.md
index 82867709d9814..73362ae462dae 100644
--- a/.github/prompts/breaking-change.md
+++ b/.github/prompts/breaking-change.md
@@ -1,4 +1,4 @@
-When you're assigned an issue that's labeled "breaking-change", or when you're given a link to an issue that's labeled "breaking-change" and asked to create a new breaking change document, follow the following guidelines:
+When you're assigned an issue that's labeled "breaking-change", or when you're given a link to an issue with this prompt file as context and asked to create a new breaking change document, follow these guidelines:
The document should be in Markdown format.
diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md
index 0c1f40c715143..566dce6cfc1ae 100644
--- a/docs/azure/includes/dotnet-all.md
+++ b/docs/azure/includes/dotnet-all.md
@@ -30,7 +30,7 @@
| Conversational Language Understanding | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.1.0)
NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Conversations/2.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.1.0/sdk/cognitivelanguage/Azure.AI.Language.Conversations/)
GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_2.0.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Conversations/) |
| Conversations Authoring | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.Language.Conversations.Authoring/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations.Authoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations.Authoring_1.0.0-beta.1/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/) |
| Core - Client - AMQP | NuGet [1.3.1](https://www.nuget.org/packages/Azure.Core.Amqp/1.3.1) | [docs](/dotnet/api/overview/azure/Core.Amqp-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Amqp_1.3.1/sdk/core/Azure.Core.Amqp/) |
-| Core - Client - Core | NuGet [1.46.1](https://www.nuget.org/packages/Azure.Core/1.46.1) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.46.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.46.1/sdk/core/Azure.Core/) |
+| Core - Client - Core | NuGet [1.46.2](https://www.nuget.org/packages/Azure.Core/1.46.2) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.46.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.46.2/sdk/core/Azure.Core/) |
| Core Newtonsoft Json | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Core.NewtonsoftJson/2.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.NewtonsoftJson-readme) | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.NewtonsoftJson_2.0.0/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/) |
| Core WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.CoreWCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.CoreWCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.CoreWCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/) |
| Data Movement | NuGet [12.1.0](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.1.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement-readme) | GitHub [12.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.1.0/sdk/storage/Azure.Storage.DataMovement/) |
@@ -110,7 +110,7 @@
| Synapse - Monitoring | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Analytics.Synapse.Monitoring/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Monitoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Monitoring_1.0.0-beta.3/sdk/synapse/Azure.Analytics.Synapse.Monitoring/) |
| Synapse - Spark | NuGet [1.0.0-preview.8](https://www.nuget.org/packages/Azure.Analytics.Synapse.Spark/1.0.0-preview.8) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Spark-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Spark_1.0.0-preview.8/sdk/synapse/Azure.Analytics.Synapse.Spark/) |
| System Events | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.Messaging.EventGrid.SystemEvents/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid.SystemEvents-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid.SystemEvents_1.0.0-beta.5/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/) |
-| System.ClientModel | NuGet [1.4.1](https://www.nuget.org/packages/System.ClientModel/1.4.1) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.4.1](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.4.1/sdk/core/System.ClientModel/) |
+| System.ClientModel | NuGet [1.4.2](https://www.nuget.org/packages/System.ClientModel/1.4.2) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.4.2](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.4.2/sdk/core/System.ClientModel/) |
| Tables | NuGet [12.11.0](https://www.nuget.org/packages/Azure.Data.Tables/12.11.0) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.11.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.11.0/sdk/tables/Azure.Data.Tables/) |
| Text Analytics | NuGet [5.3.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0/sdk/textanalytics/Azure.AI.TextAnalytics/) |
| Text Authoring | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.Language.Text.Authoring/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.Language.Text.Authoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text.Authoring_1.0.0-beta.1/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/) |
diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md
index 5a5c0620905cb..5aa45afc9ae48 100644
--- a/docs/azure/includes/dotnet-new.md
+++ b/docs/azure/includes/dotnet-new.md
@@ -31,7 +31,7 @@
| Conversational Language Understanding | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.Language.Conversations/1.1.0)
NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Conversations/2.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_1.1.0/sdk/cognitivelanguage/Azure.AI.Language.Conversations/)
GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations_2.0.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Conversations/) |
| Conversations Authoring | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.Language.Conversations.Authoring/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.Language.Conversations.Authoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Conversations.Authoring_1.0.0-beta.1/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/) |
| Core - Client - AMQP | NuGet [1.3.1](https://www.nuget.org/packages/Azure.Core.Amqp/1.3.1) | [docs](/dotnet/api/overview/azure/Core.Amqp-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Amqp_1.3.1/sdk/core/Azure.Core.Amqp/) |
-| Core - Client - Core | NuGet [1.46.1](https://www.nuget.org/packages/Azure.Core/1.46.1) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.46.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.46.1/sdk/core/Azure.Core/) |
+| Core - Client - Core | NuGet [1.46.2](https://www.nuget.org/packages/Azure.Core/1.46.2) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.46.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.46.2/sdk/core/Azure.Core/) |
| Core Newtonsoft Json | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Core.NewtonsoftJson/2.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.NewtonsoftJson-readme) | GitHub [2.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.NewtonsoftJson_2.0.0/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/) |
| Core WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.CoreWCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.CoreWCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.CoreWCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/) |
| Data Movement | NuGet [12.1.0](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.1.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement-readme) | GitHub [12.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.1.0/sdk/storage/Azure.Storage.DataMovement/) |
@@ -114,7 +114,7 @@
| Synapse - Monitoring | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Analytics.Synapse.Monitoring/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Monitoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Monitoring_1.0.0-beta.3/sdk/synapse/Azure.Analytics.Synapse.Monitoring/) |
| Synapse - Spark | NuGet [1.0.0-preview.8](https://www.nuget.org/packages/Azure.Analytics.Synapse.Spark/1.0.0-preview.8) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Spark-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Spark_1.0.0-preview.8/sdk/synapse/Azure.Analytics.Synapse.Spark/) |
| System Events | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.Messaging.EventGrid.SystemEvents/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid.SystemEvents-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid.SystemEvents_1.0.0-beta.5/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/) |
-| System.ClientModel | NuGet [1.4.1](https://www.nuget.org/packages/System.ClientModel/1.4.1) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.4.1](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.4.1/sdk/core/System.ClientModel/) |
+| System.ClientModel | NuGet [1.4.2](https://www.nuget.org/packages/System.ClientModel/1.4.2) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.4.2](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.4.2/sdk/core/System.ClientModel/) |
| Tables | NuGet [12.11.0](https://www.nuget.org/packages/Azure.Data.Tables/12.11.0) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.11.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.11.0/sdk/tables/Azure.Data.Tables/) |
| Text Analytics | NuGet [5.3.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0/sdk/textanalytics/Azure.AI.TextAnalytics/) |
| Text Authoring | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.Language.Text.Authoring/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.Language.Text.Authoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text.Authoring_1.0.0-beta.1/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/) |
diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md
index 2585f8ebd1f6a..a86c556eddb9a 100644
--- a/docs/core/compatibility/10.0.md
+++ b/docs/core/compatibility/10.0.md
@@ -2,7 +2,7 @@
title: Breaking changes in .NET 10
titleSuffix: ""
description: Navigate to the breaking changes in .NET 10.
-ms.date: 04/21/2025
+ms.date: 06/05/2025
ai-usage: ai-assisted
no-loc: [Blazor, Razor, Kestrel]
---
@@ -18,78 +18,80 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
## Containers
-| Title | Type of change | Introduced version |
-|----------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
-| [Default .NET images use Ubuntu](containers/10.0/default-images-use-ubuntu.md) | Behavioral change | Preview 1 |
+| Title | Type of change | Introduced version |
+|--------------------------------------------------------------------------------|-------------------|--------------------|
+| [Default .NET images use Ubuntu](containers/10.0/default-images-use-ubuntu.md) | Behavioral change | Preview 1 |
## Core .NET libraries
-| Title | Type of change | Introduced version |
-|----------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
-| [ActivitySource.CreateActivity and ActivitySource.StartActivity behavior change](core-libraries/10.0/activity-sampling.md) | Behavioral change | Preview 1 |
-| [C# 14 overload resolution with span parameters](core-libraries/10.0/csharp-overload-resolution.md) | Behavioral change | Preview 1 |
-| [Consistent shift behavior in generic math](core-libraries/10.0/generic-math.md) | Behavioral change | Preview 1 |
-| [Default trace context propagator updated to W3C standard](core-libraries/10.0/default-trace-context-propagator.md) | Behavioral change | Preview 4 |
-| [LDAP DirectoryControl parsing is now more stringent](core-libraries/10.0/ldap-directorycontrol-parsing.md) | Behavioral change | Preview 1 |
-| [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 |
-| [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 |
+| Title | Type of change | Introduced version |
+|-------|-------------------|--------------------|
+| [ActivitySource.CreateActivity and ActivitySource.StartActivity behavior change](core-libraries/10.0/activity-sampling.md) | Behavioral change | Preview 1 |
+| [C# 14 overload resolution with span parameters](core-libraries/10.0/csharp-overload-resolution.md) | Behavioral change | Preview 1 |
+| [Consistent shift behavior in generic math](core-libraries/10.0/generic-math.md) | Behavioral change | Preview 1 |
+| [Default trace context propagator updated to W3C standard](core-libraries/10.0/default-trace-context-propagator.md) | Behavioral change | Preview 4 |
+| [LDAP DirectoryControl parsing is now more stringent](core-libraries/10.0/ldap-directorycontrol-parsing.md) | Behavioral change | Preview 1 |
+| [MacCatalyst version normalization](core-libraries/10.0/maccatalyst-version-normalization.md) | Behavioral change | Preview 1 |
+| [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 |
+| [YMM embedded rounding removed from AVX10.2](core-libraries/10.0/ymm-embedded-rounding.md) | Behavioral change | Preview 5 |
## Extensions
-| Title | Type of change | Introduced version |
-|-----------------------------------------------------------------------------------------------------------|---------------------|--------------------|
-| [ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly](extensions/10.0/provideraliasattribute-moved-assembly.md) | Source incompatible | Preview 4 |
+| Title | Type of change | Introduced version |
+|-------|---------------------|--------------------|
+| [ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly](extensions/10.0/provideraliasattribute-moved-assembly.md) | Source incompatible | Preview 4 |
## Globalization
-| Title | Type of change | Introduced version |
-|-------------------------------------------------------------------------------------------------------|-------------------|--------------------|
-| [Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE](globalization/10.0/version-override.md) | Behavioral change | Preview 1 |
+| Title | Type of change | Introduced version |
+|-------|-------------------|--------------------|
+| [Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE](globalization/10.0/version-override.md) | Behavioral change | Preview 1 |
## Cryptography
-| Title | Type of change | Introduced version |
-|----------------------------------------------------------------------------------------------------------|---------------------------------------|--------------------|
-| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 |
-| [X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md) | Behavioral/source incompatible change | Preview 3 |
-| [Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE](cryptography/10.0/version-override.md) | Behavioral change | Preview 1 |
+| Title | Type of change | Introduced version |
+|-------|-------------------|--------------------|
+| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 |
+| [X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md) | Behavioral/source incompatible change | Preview 3 |
+| [Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE](cryptography/10.0/version-override.md) | Behavioral change | Preview 1 |
## Interop
-| Title | Type of change | Introduced version |
-|------------------------------------------------------------------------------------------------------------------------------------|-------------------|--------------------|
-| [Specifying DllImportSearchPath.AssemblyDirectory only searches the assembly directory](interop/10.0/search-assembly-directory.md) | Behavioral change | Preview 5 |
+| Title | Type of change | Introduced version |
+|-------|-------------------|--------------------|
+| [Specifying DllImportSearchPath.AssemblyDirectory only searches the assembly directory](interop/10.0/search-assembly-directory.md) | Behavioral change | Preview 5 |
## Networking
-| Title | Type of change | Introduced version |
-|------------------------------------------------------------------------------------------------------------------|-------------------|--------------------|
-| [Streaming HTTP responses enabled by default in browser HTTP clients](networking/10.0/default-http-streaming.md) | Behavioral change | Preview 3 |
+| Title | Type of change | Introduced version |
+|-------|-------------------|--------------------|
+| [Streaming HTTP responses enabled by default in browser HTTP clients](networking/10.0/default-http-streaming.md) | Behavioral change | Preview 3 |
## SDK and MSBuild
-| Title | Type of change | Introduced version |
-|------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|--------------------|
-| [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 |
-| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
-| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
-| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
-| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
-| [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 |
-| [HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`](sdk/10.0/http-warnings-to-errors.md) | Behavioral/source incompatible change | Preview 4 |
+| Title | Type of change | Introduced version |
+|-------|-------------------|--------------------|
+| [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 |
+| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
+| [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 |
+| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
+| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
+| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
+| [NU1510 is raised for direct references pruned by NuGet](sdk/10.0/nu1510-pruned-references.md) | Source incompatible | Preview 1 |
+| [HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search`](sdk/10.0/http-warnings-to-errors.md) | Behavioral/source incompatible change | Preview 4 |
## Windows Forms
-| Title | Type of change | Introduced version |
-|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------|--------------------|
-| [API obsoletions](windows-forms/10.0/obsolete-apis.md) | Source incompatible | Preview 1 |
-| [Applications referencing both WPF and WinForms must disambiguate MenuItem and ContextMenu types](windows-forms/10.0/menuitem-contextmenu.md) | Source incompatible | Preview 1 |
-| [Renamed parameter in HtmlElement.InsertAdjacentElement](windows-forms/10.0/insertadjacentelement-orientation.md) | Source incompatible | Preview 1 |
-| [TreeView checkbox image truncation](windows-forms/10.0/treeview-text-location.md) | Behavioral change | Preview 1 |
-| [StatusStrip uses System RenderMode by default](windows-forms/10.0/statusstrip-renderer.md) | Behavioral change | Preview 1 |
+| Title | Type of change | Introduced version |
+|--------------------------------------------------------|---------------------|--------------------|
+| [API obsoletions](windows-forms/10.0/obsolete-apis.md) | Source incompatible | Preview 1 |
+| [Applications referencing both WPF and WinForms must disambiguate MenuItem and ContextMenu types](windows-forms/10.0/menuitem-contextmenu.md) | Source incompatible | Preview 1 |
+| [Renamed parameter in HtmlElement.InsertAdjacentElement](windows-forms/10.0/insertadjacentelement-orientation.md) | Source incompatible | Preview 1 |
+| [TreeView checkbox image truncation](windows-forms/10.0/treeview-text-location.md) | Behavioral change | Preview 1 |
+| [StatusStrip uses System RenderMode by default](windows-forms/10.0/statusstrip-renderer.md) | Behavioral change | Preview 1 |
## Windows Presentation Foundation (WPF)
-| Title | Type of change | Introduced version |
-|--------------------------------------------------------------------------------------------------|---------------------------------------|--------------------|
+| Title | Type of change | Introduced version |
+|-------|---------------------------------------|--------------------|
| [Incorrect usage of DynamicResource causes application crash](wpf/10.0/dynamicresource-crash.md) | Source incompatible/behavioral change | Preview 4 |
diff --git a/docs/core/compatibility/core-libraries/10.0/ymm-embedded-rounding.md b/docs/core/compatibility/core-libraries/10.0/ymm-embedded-rounding.md
new file mode 100644
index 0000000000000..297f26ed59de6
--- /dev/null
+++ b/docs/core/compatibility/core-libraries/10.0/ymm-embedded-rounding.md
@@ -0,0 +1,53 @@
+---
+title: "Breaking change: YMM embedded rounding removed from AVX10.2"
+description: Learn about the .NET 10 breaking change in core .NET libraries where support for YMM embedded rounding was removed from AVX10.2.
+ms.date: 06/06/2025
+---
+
+# YMM embedded rounding removed from AVX10.2
+
+Support for YMM embedded rounding has been removed from the type.
+
+## Previous behavior
+
+In previous .NET 10 Preview versions, the [affected APIs](#affected-apis) in were available.
+
+## New behavior
+
+Starting in Preview 5, the [affected APIs](#affected-apis) in are removed and no longer available.
+
+## Version introduced
+
+.NET 10 Preview 5
+
+## Type of breaking change
+
+This change can affect [binary compatibility](../../categories.md#binary-compatibility) and [source compatibility](../../categories.md#source-compatibility).
+
+## Reason for change
+
+Intel pivoted direction and now requires that AVX10.2 also implement AVX512. Since ZMM embedded rounding is always available, the YMM embedded rounding feature isn't necessary.
+
+## Recommended action
+
+Because the hardware isn't yet available, no users should be affected by this change.
+
+## Affected APIs
+
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToSByteWithSaturationAndZeroExtendToInt32`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToByteWithSaturationAndZeroExtendToInt32`
+- `System.Runtime.Intrinsics.X86.Avx10v2.Add`
+- `System.Runtime.Intrinsics.X86.Avx10v2.Divide`
+- `System.Runtime.Intrinsics.X86.Avx10v2.Multiply`
+- `System.Runtime.Intrinsics.X86.Avx10v2.Scale`
+- `System.Runtime.Intrinsics.X86.Avx10v2.Sqrt`
+- `System.Runtime.Intrinsics.X86.Avx10v2.Subtract`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector128Int32`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector128Single`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector128UInt32`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector256Double`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector256Int32`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector256Int64`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector256Single`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector256UInt32`
+- `System.Runtime.Intrinsics.X86.Avx10v2.ConvertToVector256UInt64`
diff --git a/docs/core/compatibility/sdk/10.0/dotnet-package-list-restore.md b/docs/core/compatibility/sdk/10.0/dotnet-package-list-restore.md
new file mode 100644
index 0000000000000..31acd969649f7
--- /dev/null
+++ b/docs/core/compatibility/sdk/10.0/dotnet-package-list-restore.md
@@ -0,0 +1,43 @@
+---
+title: "Breaking change - dotnet package list command now performs restore by default"
+description: "Learn about the breaking change in .NET 10 where the dotnet package list command now performs a restore before listing packages."
+ms.date: 06/05/2025
+ai-usage: ai-assisted
+ms.custom: https://github.com/dotnet/docs/issues/46103
+---
+
+# dotnet package list command now performs restore by default
+
+The `dotnet package list` command now automatically performs a restore operation before listing packages to ensure accurate and up-to-date results. This is a behavioral change from the previous implementation where the command did not require a restore step. Additionally, if the restore operation fails, an error message is logged.
+
+## Version introduced
+
+.NET 10 Preview 4
+
+## Previous behavior
+
+The `dotnet package list` command listed project packages without performing a restore. If a restore was needed, you had to run it manually before using the command.
+
+## New behavior
+
+The `dotnet package list` command now automatically performs a restore before listing packages. If the restore fails, the command doesn't list packages and instead logs an error message in both plain text and JSON formats, depending on the command usage.
+
+## Type of breaking change
+
+This change is a [behavioral change](../../categories.md#behavioral-change).
+
+## Reason for change
+
+This change ensures the `dotnet package list` command provides accurate and up-to-date package information.
+
+## Recommended action
+
+If this change causes issues in your workflow:
+
+- Use the `--no-restore` option with `dotnet package list` if you want to bypass the implicit restore step.
+- Make sure your project is ready for restore before running the `dotnet package list` command.
+- Alternatively, run `dotnet restore` manually before using `dotnet package list` to decouple the restore step.
+
+## Affected APIs
+
+None.
diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml
index 4839bacb0f436..a5a7c73d1f6b2 100644
--- a/docs/core/compatibility/toc.yml
+++ b/docs/core/compatibility/toc.yml
@@ -29,7 +29,9 @@ items:
- name: MacCatalyst version normalization
href: core-libraries/10.0/maccatalyst-version-normalization.md
- name: System.Linq.AsyncEnumerable included in core libraries
- href: core-libraries/10.0/asyncenumerable.md
+ href: core-libraries/10.0/asyncenumerable.md
+ - name: YMM embedded rounding removed from AVX10.2
+ href: core-libraries/10.0/ymm-embedded-rounding.md
- name: Cryptography
items:
- name: X500DistinguishedName validation is stricter
@@ -62,13 +64,15 @@ items:
href: sdk/10.0/nugetaudit-transitive-packages.md
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
href: sdk/10.0/default-workload-config.md
+ - name: "`dotnet package list` performs restore"
+ href: sdk/10.0/dotnet-package-list-restore.md
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
href: sdk/10.0/custom-build-event-warning.md
- name: MSBuild custom culture resource handling
href: sdk/10.0/msbuild-custom-culture.md
- name: NU1510 is raised for direct references pruned by NuGet
href: sdk/10.0/nu1510-pruned-references.md
- - name: HTTP warnings promoted to errors in 'dotnet package list' and 'dotnet package search'
+ - name: HTTP warnings promoted to errors in package list and search
href: sdk/10.0/http-warnings-to-errors.md
- name: Windows Forms
items:
@@ -85,7 +89,7 @@ items:
- name: WPF
items:
- name: Incorrect usage of DynamicResource causes application crash
- href: wpf/10.0/dynamicresource-crash.md
+ href: wpf/10.0/dynamicresource-crash.md
- name: .NET 9
items:
- name: Overview
@@ -115,11 +119,13 @@ items:
- name: Altered UnsafeAccessor support for non-open generics
href: core-libraries/9.0/unsafeaccessor-generics.md
- name: Ambiguous overload resolution affecting StringValues implicit operators
- href: core-libraries/9.0/ambiguous-overload.md
+ href: core-libraries/9.0/ambiguous-overload.md
- name: API obsoletions with custom diagnostic IDs
href: core-libraries/9.0/obsolete-apis-with-custom-diagnostics.md
- name: BigInteger maximum length
href: core-libraries/9.0/biginteger-limit.md
+ - name: BinaryReader.GetString() returns "/uFFFD" on malformed sequences
+ href: core-libraries/9.0/binaryreader.md
- name: C# overload resolution prefers `params` span-type overloads
href: core-libraries/9.0/params-overloads.md
- name: Creating type of array of System.Void not allowed
@@ -200,8 +206,6 @@ items:
href: sdk/9.0/dotnet-workload-output.md
- name: "`installer` repo version no longer documented"
href: sdk/9.0/productcommits-versions.md
- - name: MSBuild custom culture resource handling
- href: sdk/10.0/msbuild-custom-culture.md
- name: New default RID used when targeting .NET Framework
href: sdk/9.0/default-rid.md
- name: Terminal logger is default
@@ -219,7 +223,7 @@ items:
- name: Nullable JsonDocument properties deserialize to JsonValueKind.Null
href: serialization/9.0/jsondocument-props.md
- name: System.Text.Json metadata reader now unescapes metadata property names
- href: serialization/9.0/json-metadata-reader.md
+ href: serialization/9.0/json-metadata-reader.md
- name: Windows Forms
items:
- name: BindingSource.SortDescriptions doesn't return null
@@ -292,8 +296,6 @@ items:
href: core-libraries/8.0/file-path-backslash.md
- name: Base64.DecodeFromUtf8 methods ignore whitespace
href: core-libraries/8.0/decodefromutf8-whitespace.md
- - name: BinaryReader.GetString() returns "/uFFFD" on malformed sequences
- href: core-libraries/9.0/binaryreader.md
- name: Boolean-backed enum type support removed
href: core-libraries/8.0/bool-backed-enum.md
- name: Complex.ToString format changed to ``
@@ -496,6 +498,10 @@ items:
href: aspnet-core/7.0/output-caching-renames.md
- name: SignalR Hub methods try to resolve parameters from DI
href: aspnet-core/7.0/signalr-hub-method-parameters-di.md
+ - name: Configuration
+ items:
+ - name: System.diagnostics entry in app.config
+ href: configuration/7.0/diagnostics-config-section.md
- name: Core .NET libraries
items:
- name: API obsoletions with default diagnostic ID
@@ -538,10 +544,6 @@ items:
href: core-libraries/7.0/memorycache-tracking.md
- name: Validate CompressionLevel for BrotliStream
href: core-libraries/7.0/compressionlevel-validation.md
- - name: Configuration
- items:
- - name: System.diagnostics entry in app.config
- href: configuration/7.0/diagnostics-config-section.md
- name: Cryptography
items:
- name: Dynamic X509ChainPolicy verification time
@@ -1334,6 +1336,16 @@ items:
href: aspnet-core/5.0/static-files-csv-content-type-changed.md
- name: .NET Core 3.0-3.1
href: aspnetcore.md
+ - name: .NET Aspire
+ items:
+ - name: Aspire 9.3
+ href: /dotnet/aspire/compatibility/9.3/?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json
+ - name: Aspire 9.2
+ href: /dotnet/aspire/compatibility/9.2/?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json
+ - name: Aspire 9.1
+ href: /dotnet/aspire/compatibility/9.1/?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json
+ - name: Aspire 9.0
+ href: /dotnet/aspire/compatibility/9.0/?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json
- name: Code analysis
items:
- name: .NET 5
@@ -1414,6 +1426,8 @@ items:
href: core-libraries/10.0/maccatalyst-version-normalization.md
- name: System.Linq.AsyncEnumerable included in core libraries
href: core-libraries/10.0/asyncenumerable.md
+ - name: YMM embedded rounding removed from AVX10.2
+ href: core-libraries/10.0/ymm-embedded-rounding.md
- name: .NET 9
items:
- name: Adding a ZipArchiveEntry sets header general-purpose bit flags
@@ -1421,7 +1435,7 @@ items:
- name: Altered UnsafeAccessor support for non-open generics
href: core-libraries/9.0/unsafeaccessor-generics.md
- name: Ambiguous overload resolution affecting StringValues implicit operators
- href: core-libraries/9.0/ambiguous-overload.md
+ href: core-libraries/9.0/ambiguous-overload.md
- name: API obsoletions with custom diagnostic IDs
href: core-libraries/9.0/obsolete-apis-with-custom-diagnostics.md
- name: BigInteger maximum length
@@ -1736,6 +1750,8 @@ items:
href: deployment/7.0/x86-host-path.md
- name: Entity Framework Core
items:
+ - name: EF Core 10
+ href: /ef/core/what-is-new/ef-core-10.0/breaking-changes?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json
- name: EF Core 9
href: /ef/core/what-is-new/ef-core-9.0/breaking-changes?toc=/dotnet/core/compatibility/toc.json&bc=/dotnet/breadcrumb/toc.json
- name: EF Core 8
@@ -1960,13 +1976,15 @@ items:
href: sdk/10.0/nugetaudit-transitive-packages.md
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
href: sdk/10.0/default-workload-config.md
+ - name: "`dotnet package list` performs restore"
+ href: sdk/10.0/dotnet-package-list-restore.md
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
href: sdk/10.0/custom-build-event-warning.md
- name: MSBuild custom culture resource handling
href: sdk/10.0/msbuild-custom-culture.md
- name: NU1510 is raised for direct references pruned by NuGet
href: sdk/10.0/nu1510-pruned-references.md
- - name: HTTP warnings promoted to errors in dotnet package list and dotnet package search
+ - name: HTTP warnings promoted to errors in package list and search
href: sdk/10.0/http-warnings-to-errors.md
- name: .NET 9
items:
@@ -1978,8 +1996,6 @@ items:
href: sdk/9.0/dotnet-workload-output.md
- name: "`installer` repo version no longer documented"
href: sdk/9.0/productcommits-versions.md
- - name: MSBuild custom culture resource handling
- href: sdk/10.0/msbuild-custom-culture.md
- name: New default RID used when targeting .NET Framework
href: sdk/9.0/default-rid.md
- name: Terminal logger is default
@@ -2125,7 +2141,7 @@ items:
- name: Nullable JsonDocument properties deserialize to JsonValueKind.Null
href: serialization/9.0/jsondocument-props.md
- name: System.Text.Json metadata reader now unescapes metadata property names
- href: serialization/9.0/json-metadata-reader.md
+ href: serialization/9.0/json-metadata-reader.md
- name: .NET 8
items:
- name: BinaryFormatter disabled for most projects
@@ -2305,7 +2321,7 @@ items:
- name: .NET 10
items:
- name: Incorrect usage of DynamicResource causes application crash
- href: wpf/10.0/dynamicresource-crash.md
+ href: wpf/10.0/dynamicresource-crash.md
- name: .NET 9
items:
- name: "'GetXmlNamespaceMaps' type change"
diff --git a/docs/core/extensions/data-redaction.md b/docs/core/extensions/data-redaction.md
index 3a09f8f7bd12a..392a8b6ac8695 100644
--- a/docs/core/extensions/data-redaction.md
+++ b/docs/core/extensions/data-redaction.md
@@ -183,3 +183,53 @@ public sealed class StarRedactorProvider : IRedactorProvider
public Redactor GetRedactor(DataClassificationSet classifications) => _starRedactor;
}
```
+
+## Logging sensitive information
+
+Logging is a common source of accidental data exposure. Sensitive information such as personal data, credentials, or financial details should never be written to logs in plain text. To prevent this, always use redaction when logging potentially sensitive data.
+
+### Steps for logging sensitive data
+
+1. **Install the telemetry extensions package**: Install [Microsoft.Extensions.Telemetry](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry) to be able to use the extended logger to enable redaction feature.
+2. **Set up redaction**: Integrate redactors with your logging pipeline by calling the method, to automatically sanitize or mask sensitive fields before they are written to logs.
+3. **Identify sensitive fields**: Know which data in your application is sensitive and requires protection, and mark them with appropriate data classification.
+4. **Review log output**: Regularly audit your logs to ensure no sensitive data is exposed.
+
+### Example: Redacting data in logs
+
+When using [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging), you can combine redaction with logging as follows:
+
+```csharp
+using Microsoft.Extensions.Telemetry;
+using Microsoft.Extensions.Compliance.Redaction;
+
+var services = new ServiceCollection();
+services.AddLogging(builder =>
+{
+ // Enable redaction.
+ builder.EnableRedaction();
+});
+
+services.AddRedaction(builder =>
+{
+ // configure redactors for your data classifications
+ builder.SetRedactor(MyTaxonomyClassifications.Private);
+});
+// Use annotations to mark sensitive data.
+// For example, apply the Private classification to SSN data.
+[LoggerMessage(0, LogLevel.Information, "User SSN: {SSN}")]
+public static partial void LogPrivateInformation(
+ this ILogger logger,
+ [MyTaxonomyClassifications.Private] string SSN);
+
+public void TestLogging()
+{
+ LogPrivateInformation("MySSN");
+}
+```
+
+The output should be like this:
+
+`User SSN: *****`
+
+This ensures that sensitive data is redacted before being logged, reducing the risk of data leaks.
diff --git a/docs/core/extensions/logger-message-generator.md b/docs/core/extensions/logger-message-generator.md
index 54d80f62c9df9..0563a90464400 100644
--- a/docs/core/extensions/logger-message-generator.md
+++ b/docs/core/extensions/logger-message-generator.md
@@ -367,6 +367,64 @@ Consider the example logging output when using the `JsonConsole` formatter:
}
```
+## Redacting sensitive information in logs
+
+When logging sensitive data, it's important to prevent accidental exposure. Even with compile-time generated logging methods, logging raw sensitive values can lead to data leaks and compliance issues.
+
+The [Microsoft.Extensions.Telemetry](https://www.nuget.org/packages/Microsoft.Extensions.Telemetry) library provides advanced logging and telemetry enrichment capabilities for .NET applications. It extends the logging pipeline to automatically apply redaction to classified data when writing logs. It enables you to enforce data protection policies throughout your application by integrating redaction into your logging workflow. It is built for applications needing sophisticated telemetry and logging insights.
+
+To enable redaction, use the [Microsoft.Extensions.Compliance.Redaction](https://www.nuget.org/packages/Microsoft.Extensions.Compliance.Redaction) library. This library provides **redactors**—components that transform sensitive data (for example, by erasing, masking, or hashing it) so that it is safe to output. Redactors are selected based on **data classification**, which lets you label data according to its sensitivity (such as personal, private, or public).
+
+To use redaction with source-generated logging methods, you should:
+
+1. Classify your sensitive data using a data classification system.
+2. Register and configure redactors for each classification in your DI container.
+3. Enable redaction in the logging pipeline.
+4. Check your logs to ensure no sensitive data is exposed.
+
+For example, if you have a log message that has a parameter that is considered private:
+
+```csharp
+[LoggerMessage(0, LogLevel.Information, "User SSN: {SSN}")]
+public static partial void LogPrivateInformation(
+ this ILogger logger,
+ [MyTaxonomyClassifications.Private] string SSN);
+```
+
+You will need to have a setting similar to this:
+
+```csharp
+using Microsoft.Extensions.Telemetry;
+using Microsoft.Extensions.Compliance.Redaction;
+
+var services = new ServiceCollection();
+services.AddLogging(builder =>
+{
+ // Enable redaction.
+ builder.EnableRedaction();
+});
+
+services.AddRedaction(builder =>
+{
+ // configure redactors for your data classifications
+ builder.SetRedactor(MyTaxonomyClassifications.Private);
+});
+
+public void TestLogging()
+{
+ LogPrivateInformation("MySSN");
+}
+```
+
+The output should be like this:
+
+`User SSN: *****`
+
+This approach ensures that only redacted data is logged, even when using compile-time generated logging APIs. You can use different redactors for different data types or classifications, and update your redaction logic centrally.
+
+For more details about how to classify your data, see [Data classification in .NET](data-classification.md).
+For more details about redaction and redactors, see [Data redaction in .NET](data-redaction.md).
+
## Summary
With the advent of C# source generators, writing highly performant logging APIs is much easier. Using the source generator approach has several key benefits:
@@ -388,4 +446,6 @@ Additionally, there are benefits over manually using ] [--configfile ] [--disable-build-servers]
[--no-cache] [--no-dependencies] [--packages ]
[-r|--runtime ] [-s|--source ]
[--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]]
- [--use-lock-file] [-v|--verbosity ]
+ [--use-lock-file] [-a|--arch ] [--os ] [-v|--verbosity ]
dotnet restore -h|--help
```
@@ -156,6 +156,18 @@ There are three specific settings that `dotnet restore` ignores:
Enables project lock file to be generated and used with restore.
+- **`-a|--arch`**
+
+ Specifies the target architecture.This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a `win-x64` machine, specifying `--arch arm64` sets the RID to `win-arm64`.
+
+ Introduced in .NET SDK 8.0.100
+
+- **`--os`**
+
+ Specifies the target operating system (OS).This is a shorthand syntax for setting the Runtime Identifier (RID), where the provided value is combined with the default RID. For example, on a `win-x64` machine, specifying `--os linux` sets the RID to `linux-x64`.
+
+ Introduced in .NET SDK 10.0.100
+
[!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)]
## Examples
diff --git a/docs/csharp/linq/how-to-query-files-and-directories.md b/docs/csharp/linq/how-to-query-files-and-directories.md
index 3b27e97cfb320..478f90ecd0c07 100644
--- a/docs/csharp/linq/how-to-query-files-and-directories.md
+++ b/docs/csharp/linq/how-to-query-files-and-directories.md
@@ -129,5 +129,4 @@ The following text shows how to use the method to
:::code language="csharp" source="./snippets/HowToFilesAndDirectories/SumColumns.cs" id="SumColumns":::
-If your file is a tab-separated file, just update the argument in the `Split` method to `\t`.
-
\ No newline at end of file
+If your file is a tab-separated file, just update the argument in the `SumColumns.ProcessColumns` method to `\t`.
diff --git a/docs/csharp/linq/snippets/HowToFilesAndDirectories/Program.cs b/docs/csharp/linq/snippets/HowToFilesAndDirectories/Program.cs
index 4174dbccb9bc0..f7f3e0d2eaf41 100644
--- a/docs/csharp/linq/snippets/HowToFilesAndDirectories/Program.cs
+++ b/docs/csharp/linq/snippets/HowToFilesAndDirectories/Program.cs
@@ -32,7 +32,7 @@
Console.WriteLine();
Console.WriteLine("Sum Spreadsheet columns");
-SumColumns.SumCSVColumns("scores.csv");
+SumColumns.ProcessColumns("scores.csv", ",");
static void FindFilesByExtension()
{
diff --git a/docs/csharp/linq/snippets/HowToFilesAndDirectories/SumColumns.cs b/docs/csharp/linq/snippets/HowToFilesAndDirectories/SumColumns.cs
index a8db8b22bc761..8b6fb0b8b59d9 100644
--- a/docs/csharp/linq/snippets/HowToFilesAndDirectories/SumColumns.cs
+++ b/docs/csharp/linq/snippets/HowToFilesAndDirectories/SumColumns.cs
@@ -1,117 +1,59 @@
namespace HowToFilesAndDirectories;
//
-public class SumColumns
+public static class SumColumns
{
- public static void SumCSVColumns(string fileName)
+ public static void ProcessColumns(string filePath, string seperator)
{
- string[] lines = File.ReadAllLines(fileName);
-
- // Specifies the column to compute.
- int exam = 3;
-
- // Spreadsheet format:
- // Student ID Exam#1 Exam#2 Exam#3 Exam#4
- // 111, 97, 92, 81, 60
-
- // Add one to exam to skip over the first column,
- // which holds the student ID.
- SingleColumn(lines, exam + 1);
- Console.WriteLine();
- MultiColumns(lines);
- }
-
- static void SingleColumn(IEnumerable strs, int examNum)
- {
- Console.WriteLine("Single Column Query:");
-
- // Parameter examNum specifies the column to
- // run the calculations on. This value could be
- // passed in dynamically at run time.
-
- // Variable columnQuery is an IEnumerable.
- // The following query performs two steps:
- // 1) use Split to break each row (a string) into an array
- // of strings,
- // 2) convert the element at position examNum to an int
- // and select it.
- var columnQuery = from line in strs
- let elements = line.Split(',')
- select Convert.ToInt32(elements[examNum]);
-
- // Execute the query and cache the results to improve
- // performance. This is helpful only with very large files.
- var results = columnQuery.ToList();
-
- // Perform aggregate calculations Average, Max, and
- // Min on the column specified by examNum.
- double average = results.Average();
- int max = results.Max();
- int min = results.Min();
-
- Console.WriteLine($"Exam #{examNum}: Average:{average:##.##} High Score:{max} Low Score:{min}");
+ // Divide each exam into a group
+ var exams = from line in MatrixFrom(filePath, seperator)
+ from score in line
+
+ // Identify the column number
+ let colNumber = Array.FindIndex(line, t => ReferenceEquals(score, t))
+
+ // The first column is the student ID, not the exam score
+ // so it needs to be excluded
+ where colNumber > 0
+
+ // Convert the score from string to int
+ // Group by column number, i.e. one group per exam
+ group double.Parse(score) by colNumber into g
+ select new
+ {
+ Title = $"Exam#{g.Key}",
+ Min = g.Min(),
+ Max = g.Max(),
+ Avg = Math.Round(g.Average(), 2),
+ Total = g.Sum()
+ };
+
+ foreach (var exam in exams)
+ {
+ Console.WriteLine($"{exam.Title}\t"
+ + $"Average:{exam.Avg,6}\t"
+ + $"High Score:{exam.Max,3}\t"
+ + $"Low Score:{exam.Min,3}\t"
+ + $"Total:{exam.Total,5}");
+ }
}
- static void MultiColumns(IEnumerable strs)
+ // Transform the file content to an IEnumerable of string arrays
+ // like a matrix
+ private static IEnumerable MatrixFrom(string filePath, string seperator)
{
- Console.WriteLine("Multi Column Query:");
-
- // Create a query, multiColQuery. Explicit typing is used
- // to make clear that, when executed, multiColQuery produces
- // nested sequences. However, you get the same results by
- // using 'var'.
+ using StreamReader reader = File.OpenText(filePath);
- // The multiColQuery query performs the following steps:
- // 1) use Split to break each row (a string) into an array
- // of strings,
- // 2) use Skip to skip the "Student ID" column, and store the
- // rest of the row in scores.
- // 3) convert each score in the current row from a string to
- // an int, and select that entire sequence as one row
- // in the results.
- var multiColQuery = from line in strs
- let elements = line.Split(',')
- let scores = elements.Skip(1)
- select (from str in scores
- select Convert.ToInt32(str));
-
- // Execute the query and cache the results to improve
- // performance.
- // ToArray could be used instead of ToList.
- var results = multiColQuery.ToList();
-
- // Find out how many columns you have in results.
- int columnCount = results[0].Count();
-
- // Perform aggregate calculations Average, Max, and
- // Min on each column.
- // Perform one iteration of the loop for each column
- // of scores.
- // You can use a for loop instead of a foreach loop
- // because you already executed the multiColQuery
- // query by calling ToList.
- for (int column = 0; column < columnCount; column++)
+ for (string? line = reader.ReadLine(); line is not null; line = reader.ReadLine())
{
- var results2 = from row in results
- select row.ElementAt(column);
- double average = results2.Average();
- int max = results2.Max();
- int min = results2.Min();
-
- // Add one to column because the first exam is Exam #1,
- // not Exam #0.
- Console.WriteLine($"Exam #{column + 1} Average: {average:##.##} High Score: {max} Low Score: {min}");
+ yield return line.Split(seperator, StringSplitOptions.TrimEntries);
}
}
}
-/* Output:
- Single Column Query:
- Exam #4: Average:76.92 High Score:94 Low Score:39
- Multi Column Query:
- Exam #1 Average: 86.08 High Score: 99 Low Score: 35
- Exam #2 Average: 86.42 High Score: 94 Low Score: 72
- Exam #3 Average: 84.75 High Score: 91 Low Score: 65
- Exam #4 Average: 76.92 High Score: 94 Low Score: 39
- */
+// Output:
+// Exam#1 Average: 86.08 High Score: 99 Low Score: 35 Total: 1033
+// Exam#2 Average: 86.42 High Score: 94 Low Score: 72 Total: 1037
+// Exam#3 Average: 84.75 High Score: 91 Low Score: 65 Total: 1017
+// Exam#4 Average: 76.92 High Score: 94 Low Score: 39 Total: 923
//