From 4b18c651450e00ac84a51659d57c52aa45a04d8e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 7 Aug 2025 06:59:23 -0700 Subject: [PATCH 01/12] Update package index with latest published versions (#47865) --- docs/azure/includes/dotnet-all.md | 10 +++++----- docs/azure/includes/dotnet-new.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index bb1f49bbffff3..4a870b3881a36 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -32,9 +32,9 @@ | Core - Client - Core | NuGet [1.47.1](https://www.nuget.org/packages/Azure.Core/1.47.1) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.47.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.47.1/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.2.0](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.2.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement-readme) | GitHub [12.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.2.0/sdk/storage/Azure.Storage.DataMovement/) | -| Data Movement - Blobs | NuGet [12.2.0](https://www.nuget.org/packages/Azure.Storage.DataMovement.Blobs/12.2.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Blobs-readme) | GitHub [12.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Blobs_12.2.0/sdk/storage/Azure.Storage.DataMovement.Blobs/) | -| Data Movement - Files Shares | NuGet [12.2.0](https://www.nuget.org/packages/Azure.Storage.DataMovement.Files.Shares/12.2.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Files.Shares-readme) | GitHub [12.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Files.Shares_12.2.0/sdk/storage/Azure.Storage.DataMovement.Files.Shares/) | +| Data Movement | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.2.1) | [docs](/dotnet/api/overview/azure/Storage.DataMovement-readme) | GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.2.1/sdk/storage/Azure.Storage.DataMovement/) | +| Data Movement - Blobs | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement.Blobs/12.2.1) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Blobs-readme) | GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Blobs_12.2.1/sdk/storage/Azure.Storage.DataMovement.Blobs/) | +| Data Movement - Files Shares | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement.Files.Shares/12.2.1) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Files.Shares-readme) | GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Files.Shares_12.2.1/sdk/storage/Azure.Storage.DataMovement.Files.Shares/) | | Defender EASM | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Defender.Easm/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.Defender.Easm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Defender.Easm_1.0.0-beta.1/sdk/easm/Azure.Analytics.Defender.Easm/) | | Dev Center | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Developer.DevCenter/1.0.0) | [docs](/dotnet/api/overview/azure/Developer.DevCenter-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.DevCenter_1.0.0/sdk/devcenter/Azure.Developer.DevCenter/) | | Device Update | NuGet [1.0.0](https://www.nuget.org/packages/Azure.IoT.DeviceUpdate/1.0.0) | [docs](/dotnet/api/overview/azure/IoT.DeviceUpdate-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.DeviceUpdate_1.0.0/sdk/deviceupdate/Azure.IoT.DeviceUpdate/) | @@ -83,8 +83,8 @@ | OpenTelemetry AspNetCore | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.3.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.AspNetCore-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.3.0/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | | OpenTelemetry Exporter | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.4.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.Exporter-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.4.0/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | | Personalizer | NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Personalizer/2.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Personalizer-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Personalizer_2.0.0-beta.2/sdk/personalizer/Azure.AI.Personalizer/) | -| Playwright | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.Playwright/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Developer.Playwright-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright_1.0.0-beta.1/sdk/loadtestservice/Azure.Developer.Playwright/) | -| Playwright NUnit | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.Playwright.NUnit/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Developer.Playwright.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright.NUnit_1.0.0-beta.1/sdk/loadtestservice/Azure.Developer.Playwright.NUnit/) | +| Playwright | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Developer.Playwright/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Developer.Playwright-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright_1.0.0-beta.2/sdk/loadtestservice/Azure.Developer.Playwright/) | +| Playwright NUnit | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Developer.Playwright.NUnit/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Developer.Playwright.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright.NUnit_1.0.0-beta.2/sdk/loadtestservice/Azure.Developer.Playwright.NUnit/) | | Programmable Connectivity | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.ProgrammableConnectivity/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.ProgrammableConnectivity-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.ProgrammableConnectivity_1.0.0-beta.1/sdk/communication/Azure.Communication.ProgrammableConnectivity/) | | Provisioning | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Provisioning/1.3.0) | [docs](/dotnet/api/overview/azure/Provisioning-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning_1.3.0/sdk/provisioning/Azure.Provisioning/) | | Provisioning - Resources | NuGet [0.2.0](https://www.nuget.org/packages/Azure.Provisioning.Resources/0.2.0) | [docs](/dotnet/api/overview/azure/Provisioning.Resources-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [0.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Resources_0.2.0/sdk/provisioning/Azure.Provisioning.Resources/) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index c736ddd386599..10d29f33ca3eb 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -34,9 +34,9 @@ | Core - Client - Core | NuGet [1.47.1](https://www.nuget.org/packages/Azure.Core/1.47.1) | [docs](/dotnet/api/overview/azure/Core-readme) | GitHub [1.47.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core_1.47.1/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.2.0](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.2.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement-readme) | GitHub [12.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.2.0/sdk/storage/Azure.Storage.DataMovement/) | -| Data Movement - Blobs | NuGet [12.2.0](https://www.nuget.org/packages/Azure.Storage.DataMovement.Blobs/12.2.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Blobs-readme) | GitHub [12.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Blobs_12.2.0/sdk/storage/Azure.Storage.DataMovement.Blobs/) | -| Data Movement - Files Shares | NuGet [12.2.0](https://www.nuget.org/packages/Azure.Storage.DataMovement.Files.Shares/12.2.0) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Files.Shares-readme) | GitHub [12.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Files.Shares_12.2.0/sdk/storage/Azure.Storage.DataMovement.Files.Shares/) | +| Data Movement | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.2.1) | [docs](/dotnet/api/overview/azure/Storage.DataMovement-readme) | GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.2.1/sdk/storage/Azure.Storage.DataMovement/) | +| Data Movement - Blobs | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement.Blobs/12.2.1) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Blobs-readme) | GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Blobs_12.2.1/sdk/storage/Azure.Storage.DataMovement.Blobs/) | +| Data Movement - Files Shares | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement.Files.Shares/12.2.1) | [docs](/dotnet/api/overview/azure/Storage.DataMovement.Files.Shares-readme) | GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement.Files.Shares_12.2.1/sdk/storage/Azure.Storage.DataMovement.Files.Shares/) | | Defender EASM | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.Defender.Easm/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.Defender.Easm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Defender.Easm_1.0.0-beta.1/sdk/easm/Azure.Analytics.Defender.Easm/) | | Dev Center | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Developer.DevCenter/1.0.0) | [docs](/dotnet/api/overview/azure/Developer.DevCenter-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.DevCenter_1.0.0/sdk/devcenter/Azure.Developer.DevCenter/) | | Device Update | NuGet [1.0.0](https://www.nuget.org/packages/Azure.IoT.DeviceUpdate/1.0.0) | [docs](/dotnet/api/overview/azure/IoT.DeviceUpdate-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.DeviceUpdate_1.0.0/sdk/deviceupdate/Azure.IoT.DeviceUpdate/) | @@ -86,8 +86,8 @@ | OpenTelemetry Exporter | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.4.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.Exporter-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.4.0/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | | OpenTelemetry LiveMetrics | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.LiveMetrics/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.LiveMetrics-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.LiveMetrics_1.0.0-beta.3/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/) | | Personalizer | NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Personalizer/2.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Personalizer-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Personalizer_2.0.0-beta.2/sdk/personalizer/Azure.AI.Personalizer/) | -| Playwright | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.Playwright/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Developer.Playwright-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright_1.0.0-beta.1/sdk/loadtestservice/Azure.Developer.Playwright/) | -| Playwright NUnit | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Developer.Playwright.NUnit/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Developer.Playwright.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright.NUnit_1.0.0-beta.1/sdk/loadtestservice/Azure.Developer.Playwright.NUnit/) | +| Playwright | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Developer.Playwright/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Developer.Playwright-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright_1.0.0-beta.2/sdk/loadtestservice/Azure.Developer.Playwright/) | +| Playwright NUnit | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Developer.Playwright.NUnit/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Developer.Playwright.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.Playwright.NUnit_1.0.0-beta.2/sdk/loadtestservice/Azure.Developer.Playwright.NUnit/) | | Programmable Connectivity | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Communication.ProgrammableConnectivity/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Communication.ProgrammableConnectivity-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Communication.ProgrammableConnectivity_1.0.0-beta.1/sdk/communication/Azure.Communication.ProgrammableConnectivity/) | | Provisioning | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Provisioning/1.3.0) | [docs](/dotnet/api/overview/azure/Provisioning-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning_1.3.0/sdk/provisioning/Azure.Provisioning/) | | Provisioning - Resources | NuGet [0.2.0](https://www.nuget.org/packages/Azure.Provisioning.Resources/0.2.0) | [docs](/dotnet/api/overview/azure/Provisioning.Resources-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [0.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Resources_0.2.0/sdk/provisioning/Azure.Provisioning.Resources/) | From 80c9e80c21589bc49d28020f54b355d88df6482d Mon Sep 17 00:00:00 2001 From: Stuart Mosquera Date: Thu, 7 Aug 2025 11:07:56 -0300 Subject: [PATCH 02/12] add missing warnings 'CS8784' and 'CS8785' (#47866) --- .../compiler-messages/source-generator-errors.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/compiler-messages/source-generator-errors.md b/docs/csharp/language-reference/compiler-messages/source-generator-errors.md index 005d8200a791a..bb32eddc74871 100644 --- a/docs/csharp/language-reference/compiler-messages/source-generator-errors.md +++ b/docs/csharp/language-reference/compiler-messages/source-generator-errors.md @@ -96,8 +96,10 @@ The following errors are generated when source generators or interceptors are lo - [**CS9206**](#other-failures): *An interceptor cannot be declared in the global namespace.* - [**CS9207**](#other-failures): *Cannot intercept because method is not an invocation of an ordinary member method.* -The following warnings are generated when source generators or interceptors are loaded during a compilation: +The following warnings are generated when source generators or interceptors are loaded during a compilation: +- [**CS8784**](#other-failures): *Generator '`YourSourceGeneratorName`' failed to initialize. It will not contribute to the output and compilation errors may occur as a result.* +- [**CS8785**](#other-failures): *Generator '`YourSourceGeneratorName`' failed to generate source. It will not contribute to the output and compilation errors may occur as a result.* - [**CS9154**](#signature-mismatch): *Intercepting a call to `M` with interceptor `V`, but the signatures do not match.* - [**CS9158**](#signature-mismatch): *Nullability of reference types in return type doesn't match interceptable method.* - [**CS9159**](#signature-mismatch): *Nullability of reference types in type of parameter doesn't match interceptable method.* From d6c7b9ac0c913b862f23e09358ccdbd16dc0647f Mon Sep 17 00:00:00 2001 From: fcdeveloper00 Date: Thu, 7 Aug 2025 07:08:30 -0700 Subject: [PATCH 03/12] Update bitwise-and-shift-operators.md (#47876) --- .../language-reference/operators/bitwise-and-shift-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md index c4638e8f09701..bc5bb6ca730d0 100644 --- a/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md +++ b/docs/csharp/language-reference/operators/bitwise-and-shift-operators.md @@ -38,7 +38,7 @@ helpviewer_keywords: --- # Bitwise and shift operators (C# reference) -The bitwise and shift operators include unary bitwise complement, binary left and right shift, unsigned right shift, and the binary logical AND, OR, and exclusive OR operators. These operands take operands of the [integral numeric types](../builtin-types/integral-numeric-types.md) or the [char](../builtin-types/char.md) type. +The bitwise and shift operators include unary bitwise complement, binary left and right shift, unsigned right shift, and the binary logical AND, OR, and exclusive OR operators. These operators take operands of the [integral numeric types](../builtin-types/integral-numeric-types.md) or the [char](../builtin-types/char.md) type. - Unary [`~` (bitwise complement)](#bitwise-complement-operator-) operator - Binary [`<<` (left shift)](#left-shift-operator-), [`>>` (right shift)](#right-shift-operator-), and [`>>>` (unsigned right shift)](#unsigned-right-shift-operator-) operators From 0df1cc0d875037bbb77e49a7c29759aadd6c35e7 Mon Sep 17 00:00:00 2001 From: fcdeveloper00 Date: Thu, 7 Aug 2025 07:09:05 -0700 Subject: [PATCH 04/12] Update deconstruction.md (C# reference) (#47877) --- docs/csharp/language-reference/operators/deconstruction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/csharp/language-reference/operators/deconstruction.md b/docs/csharp/language-reference/operators/deconstruction.md index 61e6554c6ade3..989c27a6bce9b 100644 --- a/docs/csharp/language-reference/operators/deconstruction.md +++ b/docs/csharp/language-reference/operators/deconstruction.md @@ -23,7 +23,7 @@ In the preceding example, the `Y` and `label` members are discarded. You can spe ## Record deconstruction -[Record](../builtin-types/record.md) types that have a [primary constructor](../builtin-types/record.md#positional-syntax-for-property-and-field-definition) support deconstruction for positional parameters. The compiler synthesizes a `Deconstruct` method that extracts the properties synthesized from positional parameters in the primary constructor. The compiler-synthesized `Deconstruction` method doesn't extract properties declared as properties in the record type. +[Record](../builtin-types/record.md) types that have a [primary constructor](../builtin-types/record.md#positional-syntax-for-property-and-field-definition) support deconstruction for positional parameters. The compiler synthesizes a `Deconstruct` method that extracts the properties synthesized from positional parameters in the primary constructor. The compiler-synthesized `Deconstruct` method doesn't extract properties declared as properties in the record type. The `record` shown in the following code declares two positional properties, `SquareFeet` and `Address`, along with another property, `RealtorNotes`: @@ -37,7 +37,7 @@ You can make use of this behavior to specify which properties of your record typ ## Declare `Deconstruct` methods -You can add deconstruction support to any class, struct, or interface you declare. You declare one or `Deconstruct` methods in your type, or as extension methods on that type. A deconstruction expression calls a method `void Deconstruct(out var p1, ..., out var pn)`. The `Deconstruct` method can be either an instance method or an extension method. The type of each parameter in the `Deconstruct` method must match the type of the corresponding argument in the deconstruction expression. The deconstruction expression assigns the value of each argument to the value of the corresponding `out` parameter in the `Deconstruct` method. If multiple `Deconstruct` methods match the deconstruction expression, the compiler reports an error for the ambiguity. +You can add deconstruction support to any class, struct, or interface you declare. You declare one or more `Deconstruct` methods in your type, or as extension methods on that type. A deconstruction expression calls a method `void Deconstruct(out var p1, ..., out var pn)`. The `Deconstruct` method can be either an instance method or an extension method. The type of each parameter in the `Deconstruct` method must match the type of the corresponding argument in the deconstruction expression. The deconstruction expression assigns the value of each argument to the value of the corresponding `out` parameter in the `Deconstruct` method. If multiple `Deconstruct` methods match the deconstruction expression, the compiler reports an error for the ambiguity. The following code declares a `Point3D` struct that has two `Deconstruct` methods: From bf028896d0798dbaf061d70fddace3b308a0a882 Mon Sep 17 00:00:00 2001 From: Mateus Rodrigues de Morais Date: Thu, 7 Aug 2025 14:52:25 -0300 Subject: [PATCH 05/12] Update current Ubuntu version to 25.04 (#47688) --- docs/core/install/linux-ubuntu-decision.md | 14 +++++++------- docs/core/install/linux-ubuntu-install.md | 15 ++++++++------- docs/zone-pivot-groups.yml | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/core/install/linux-ubuntu-decision.md b/docs/core/install/linux-ubuntu-decision.md index 14d1700fb704d..0f3b9609c1a4a 100644 --- a/docs/core/install/linux-ubuntu-decision.md +++ b/docs/core/install/linux-ubuntu-decision.md @@ -21,7 +21,7 @@ The following table is a list of currently supported .NET releases and the versi | Ubuntu | Supported .NET versions | Available in
built-in Ubuntu feed | [Available in
.NET backports
Ubuntu feed](#register-the-ubuntu-net-backports-package-repository) | [Available in
Microsoft feed](#register-the-microsoft-package-repository) | |--------------------------------------------------------------------|-------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------| -| [24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2410) | 9.0, 8.0 | 9.0, 8.0 | None | None | +| [25.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2504) | 9.0, 8.0 | 9.0, 8.0 | None | None | | [24.04 (LTS)](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2404) | 9.0, 8.0 | 8.0 | 9.0, 7.0, 6.0 | None | | [22.04 (LTS)](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2204) | 9.0, 8.0 | 8.0, 7.0, 6.0 | 9.0 | 8.0, 7.0, 6.0, 3.1 | @@ -46,7 +46,7 @@ When your version of Ubuntu supports .NET through the built-in or .NET backports | Method | Pros | Cons | |--------|------|------| -| [Package manager
(built-in
Ubuntu feed)](#supported-distributions) |
  • Usually the latest version is available.
  • Patches are available right way.
  • Dependencies are included.
  • Easy removal.
  • Available .NET versions are supported for the support period of the particular Ubuntu version.
  • Support for the IBM System Z platform for .NET 8 on Ubuntu 24.04.
|
  • Not available for Ubuntu 16.04, 18.04, 20.04.
  • .NET versions available vary by Ubuntu version.
  • Preview releases aren't available.
| +| [Package manager
(built-in
Ubuntu feed)](#supported-distributions) |
  • Usually the latest version is available.
  • Patches are available right way.
  • Dependencies are included.
  • Easy removal.
  • Available .NET versions are supported for the support period of the particular Ubuntu version.
  • Support for the IBM System Z and Power platforms for .NET 8 and newer.
|
  • Not available for Ubuntu 16.04, 18.04, 20.04.
  • .NET versions available vary by Ubuntu version.
  • Preview releases aren't available.
| | [Package manager
(.NET backports
Ubuntu feed)](#register-the-ubuntu-net-backports-package-repository) |
  • Contains any supported version, which is not contained in the built-in Ubuntu feed.
  • Patches are available right way.
  • Dependencies are included.
  • Easy removal.
  • Compatible with built-in Ubuntu feed.
|
  • Not available for Ubuntu 16.04, 18.04, 20.04.
  • Requires registering the Ubuntu .NET backports package repository.
  • Preview releases aren't available.
| | [Package manager
(Microsoft feed)](#register-the-microsoft-package-repository) |
  • Supported versions always available.
  • Patches are available right way.
  • Dependencies are included.
  • Easy removal.
|
  • Not available for Ubuntu 24.04+.
  • Requires registering the Microsoft package repository.
  • Preview releases aren't available.
  • Only supports x64 Ubuntu.
| | [Script \ Manual extraction](linux-scripted-manual.md) |
  • Control where .NET is installed.
  • Preview releases are available.
|
  • Manually install updates.
  • Manually install dependencies.
  • Manual removal.
| @@ -62,13 +62,13 @@ Use the following sections to determine how you should install .NET: - [I want to install a preview version](#i-want-to-install-a-preview-version) - [I don't want to use APT](#i-dont-want-to-use-apt) - [I'm using an Arm-based CPU](#im-using-an-arm-based-cpu) -- [I'm using the IBM System Z platform](#im-using-the-ibm-system-z-platform) +- [I'm using the IBM System Z or Power platform](#im-using-the-ibm-system-z-or-power-platform) ### I'm using Ubuntu 22.04 or later, and I only need .NET If you don't need other Microsoft packages, such as `powershell`, `mdatp`, or `mssql`, install .NET through the Ubuntu feed. For more information, see the following pages: -- [Install .NET on Ubuntu 24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2410). +- [Install .NET on Ubuntu 25.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2504). - [Install .NET on Ubuntu 24.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2404). - [Install .NET on Ubuntu 22.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2204). @@ -126,13 +126,13 @@ If the version of .NET you want isn't available, try using one of the following - [Install .NET with `install-dotnet` script.](linux-scripted-manual.md#scripted-install) - [Manually install .NET](linux-scripted-manual.md#manual-install) -### I'm using the IBM System Z platform +### I'm using the IBM System Z or Power platform -Starting with .NET 8 on Ubuntu 24.04, Canonical supports .NET for the IBM System Z platform. Canonical works on extending the support to other .NET and Ubuntu versions. +Starting with .NET 8 on Ubuntu 22.04, Canonical supports .NET for the IBM System Z and Power platforms. This support will continue for every .NET release going forward. Install .NET through the built-in Ubuntu feed. For more information, see the following page: -- [Install .NET 9 on Ubuntu 24.10](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2410&tabs=dotnet9). +- [Install .NET 9 on Ubuntu 25.04](linux-ubuntu-install.md?pivots=os-linux-ubuntu-2504&tabs=dotnet9). ## Register a package repository diff --git a/docs/core/install/linux-ubuntu-install.md b/docs/core/install/linux-ubuntu-install.md index bc2736efdcab4..db6aa74a5847a 100644 --- a/docs/core/install/linux-ubuntu-install.md +++ b/docs/core/install/linux-ubuntu-install.md @@ -17,19 +17,20 @@ This article discusses how to install .NET on Ubuntu. [!INCLUDE [linux-install-package-manager-x64-vs-arm-ubuntu](includes/linux-install-package-manager-x64-vs-arm-ubuntu.md)] -::: zone pivot="os-linux-ubuntu-2410" +::: zone pivot="os-linux-ubuntu-2504" -## Ubuntu 24.10 +## Ubuntu 25.04 [!INCLUDE [linux-ubuntu-package-feed-only](includes/linux-ubuntu-package-feed-only.md)] -The following versions of .NET are supported or available for Ubuntu 24.10: +The following versions of .NET are supported or available for Ubuntu 25.04: -- 9.0 -- 8.0 +| Supported .NET versions | Available in
built-in Ubuntu feed | [Available in
backports
Ubuntu feed](linux-ubuntu-decision.md#ubuntu-net-backports-package-repository) | [Available in
Microsoft feed](linux-ubuntu-decision.md#register-the-microsoft-package-repository) | +|-------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| +| 9.0, 8.0 | 9.0, 8.0 | None |None | When an [Ubuntu version](https://wiki.ubuntu.com/Releases) falls out of support, .NET is no longer supported with that version. @@ -181,7 +182,7 @@ When you install with a package manager, these libraries are installed for you. ===== All versions --> -::: zone pivot="os-linux-ubuntu-2410,os-linux-ubuntu-2404,os-linux-ubuntu-2204" +::: zone pivot="os-linux-ubuntu-2504,os-linux-ubuntu-2404,os-linux-ubuntu-2204" ## Unsupported versions diff --git a/docs/zone-pivot-groups.yml b/docs/zone-pivot-groups.yml index c5e76fb1c3304..362bda8aa6607 100644 --- a/docs/zone-pivot-groups.yml +++ b/docs/zone-pivot-groups.yml @@ -120,8 +120,8 @@ groups: title: Ubuntu Version prompt: Choose the Ubuntu distribution version pivots: - - id: os-linux-ubuntu-2410 - title: "24.10" + - id: os-linux-ubuntu-2504 + title: "25.04" - id: os-linux-ubuntu-2404 title: "24.04" - id: os-linux-ubuntu-2204 From 43a78fd4ecf18aefcaf76ce3eafd3adcbfa86440 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:53:29 -0400 Subject: [PATCH 06/12] Fix incorrect C# compiler option names and broken links in documentation (#47734) * Initial plan * Fix incorrect C# compiler option names in documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Fix broken links from TargetType to OutputType anchor Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Fix broken link warnings - update anchor references for compiler options Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../program-structure/main-command-line.md | 2 +- .../program-structure/top-level-statements.md | 2 +- .../compiler-options/advanced.md | 24 +++++++------------ .../compiler-options/inputs.md | 6 ++--- .../compiler-options/output.md | 23 +++++++++--------- .../compiler-options/security.md | 4 ++-- docs/csharp/misc/cs0017.md | 2 +- docs/csharp/misc/cs0734.md | 2 +- docs/csharp/misc/cs1507.md | 2 +- docs/csharp/misc/cs1509.md | 2 +- docs/csharp/misc/cs1542.md | 2 +- docs/csharp/misc/cs1555.md | 2 +- docs/csharp/misc/cs1556.md | 2 +- docs/csharp/misc/cs1557.md | 2 +- docs/csharp/misc/cs1558.md | 2 +- docs/csharp/misc/cs1559.md | 2 +- docs/csharp/misc/cs1927.md | 2 +- docs/csharp/misc/cs2017.md | 2 +- docs/csharp/misc/cs2019.md | 2 +- docs/csharp/misc/cs2022.md | 2 +- docs/csharp/misc/cs3012.md | 2 +- docs/csharp/misc/cs3013.md | 2 +- docs/csharp/misc/cs5001.md | 2 +- ...xe-windows-runtime-metadata-export-tool.md | 2 +- .../language-reference/compiler-options.md | 2 +- 25 files changed, 47 insertions(+), 52 deletions(-) diff --git a/docs/csharp/fundamentals/program-structure/main-command-line.md b/docs/csharp/fundamentals/program-structure/main-command-line.md index 2c05e82edfb1d..e32e9ed00df2f 100644 --- a/docs/csharp/fundamentals/program-structure/main-command-line.md +++ b/docs/csharp/fundamentals/program-structure/main-command-line.md @@ -16,7 +16,7 @@ helpviewer_keywords: The `Main` method is the entry point of a C# application. When the application is started, the `Main` method is the first method that is invoked. -There can only be one entry point in a C# program. If you have more than one class that has a `Main` method, you must compile your program with the **StartupObject** compiler option to specify which `Main` method to use as the entry point. For more information, see [**StartupObject** (C# Compiler Options)](../../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject). The following example displays the number of command line arguments as its first action: +There can only be one entry point in a C# program. If you have more than one class that has a `Main` method, you must compile your program with the **StartupObject** compiler option to specify which `Main` method to use as the entry point. For more information, see [**StartupObject** (C# Compiler Options)](../../language-reference/compiler-options/advanced.md#startupobject). The following example displays the number of command line arguments as its first action: :::code language="csharp" source="snippets/main-command-line/TestClass.cs"::: diff --git a/docs/csharp/fundamentals/program-structure/top-level-statements.md b/docs/csharp/fundamentals/program-structure/top-level-statements.md index 685daa1814d0e..3396d27a69988 100644 --- a/docs/csharp/fundamentals/program-structure/top-level-statements.md +++ b/docs/csharp/fundamentals/program-structure/top-level-statements.md @@ -38,7 +38,7 @@ You can write a `Main` method explicitly, but it can't function as an entry poin > CS7022 The entry point of the program is global code; ignoring 'Main()' entry point. -In a project with top-level statements, you can't use the [-main](../../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option to select the entry point, even if the project has one or more `Main` methods. +In a project with top-level statements, you can't use the [-main](../../language-reference/compiler-options/advanced.md#startupobject) compiler option to select the entry point, even if the project has one or more `Main` methods. ## `using` directives diff --git a/docs/csharp/language-reference/compiler-options/advanced.md b/docs/csharp/language-reference/compiler-options/advanced.md index 6477549e92ba2..fb37e22e45914 100644 --- a/docs/csharp/language-reference/compiler-options/advanced.md +++ b/docs/csharp/language-reference/compiler-options/advanced.md @@ -9,7 +9,7 @@ helpviewer_keywords: - "ChecksumAlgorithm compiler option [C#]" - "CodePage compiler option [C#]" - "Utf8Output compiler option [C#]" - - "MainEntryPoint compiler option [C#]" + - "StartupObject compiler option [C#]" - "GenerateFullPaths compiler option [C#]" - "FileAlignment compiler option [C#]" - "PathMap compiler option [C#]" @@ -27,7 +27,7 @@ helpviewer_keywords: The following options support advanced scenarios. The new MSBuild syntax is shown in **Bold**. The older `csc.exe` syntax is shown in `code style`. -- **MainEntryPoint**, **StartupObject** / `-main`: Specify the type that contains the entry point. +- **StartupObject** / `-main`: Specify the type that contains the entry point. - **PdbFile** / `-pdb`: Specify debug information file name. - **PathMap** / `-pathmap`: Specify a mapping for source path names output by the compiler. - **ApplicationConfiguration** / `-appconfig`: Specify an application configuration file containing assembly binding settings. @@ -54,7 +54,7 @@ You add any of these options in a `` element in your `*.csproj` f `````` -## MainEntryPoint or StartupObject +## StartupObject This option specifies the class that contains the entry point to the program, if more than one class contains a `Main` method. @@ -62,13 +62,7 @@ This option specifies the class that contains the entry point to the program, if MyNamespace.Program ``` -or - -```xml -MyNamespace.Program -``` - -Where `Program` is the type that contains the `Main` method. The provided class name must be fully qualified; it must include the full namespace containing the class, followed by the class name. For example, when the `Main` method is located inside the `Program` class in the `MyApplication.Core` namespace, the compiler option has to be `-main:MyApplication.Core.Program`. If your compilation includes more than one type with a [`Main`](../../fundamentals/program-structure/main-command-line.md) method, you can specify which type contains the `Main` method. +Where `Program` is the type that contains the `Main` method. The class name can be either fully qualified (including the namespace) or just the class name if it's unambiguous. For example, when the `Main` method is located inside the `Program` class in the `MyApplication.Core` namespace, you can specify either `-main:MyApplication.Core.Program` or just `-main:Program` if there's no ambiguity. If your compilation includes more than one type with a [`Main`](../../fundamentals/program-structure/main-command-line.md) method, you can specify which type contains the `Main` method. > [!NOTE] > This option can't be used for a project that includes [top-level statements](../../fundamentals/program-structure/top-level-statements.md), even if that project contains one or more `Main` methods. @@ -245,7 +239,7 @@ Use this option if you want to define or create your own System namespace and ob Specifies the minimum version of the subsystem on which the executable file runs. Most commonly, this option ensures that the executable file can use security features that aren’t available with older versions of Windows. > [!NOTE] -> To specify the subsystem itself, use the [**TargetType**](./output.md#targettype) compiler option. +> To specify the subsystem itself, use the [**OutputType**](./output.md#outputtype) compiler option. ```xml major.minor @@ -266,9 +260,9 @@ The following table lists common subsystem versions of Windows. The default value of the **SubsystemVersion** compiler option depends on the conditions in the following list: - The default value is 6.02 if any compiler option in the following list is set: - - [-target:appcontainerexe](output.md) - - [-target:winmdobj](output.md) - - [-platform:arm](output.md) + - [-target:appcontainerexe](output.md#outputtype) + - [-target:winmdobj](output.md#outputtype) + - [-platform:arm](output.md#platformtarget) - The default value is 6.00 if you're using MSBuild, you're targeting .NET Framework 4.5, and you haven't set any of the compiler options that were specified earlier in this list. - The default value is 4.00 if none of the previous conditions are true. @@ -286,7 +280,7 @@ Specifies the name of an assembly whose nonpublic types a *.netmodule* can acces - You know the name of the assembly into which the .netmodule will be built. - The existing assembly has granted friend assembly access to the assembly into which the .*netmodule* will be built. -For more information on building a .netmodule, see [**TargetType**](output.md#targettype) option of **module**. For more information on friend assemblies, see [Friend Assemblies](../../../standard/assembly/friend.md). +For more information on building a .netmodule, see [**OutputType**](output.md#outputtype) option of **module**. For more information on friend assemblies, see [Friend Assemblies](../../../standard/assembly/friend.md). ## ReportIVTs diff --git a/docs/csharp/language-reference/compiler-options/inputs.md b/docs/csharp/language-reference/compiler-options/inputs.md index ae3b173b870fd..2e137788f00c2 100644 --- a/docs/csharp/language-reference/compiler-options/inputs.md +++ b/docs/csharp/language-reference/compiler-options/inputs.md @@ -40,16 +40,16 @@ In the previous example, `LS` is the valid C# identifier that represents a root ## AddModules -This option adds a module that was created with the `module` switch to the current compilation: +This option adds a module that was created with the `module` switch to the current compilation: ```xml ``` -Where `file`, `file2` are output files that contain metadata. The file can't contain an assembly manifest. To import more than one file, separate file names with either a comma or a semicolon. All modules added with **AddModules** must be in the same directory as the output file at run time. That is, you can specify a module in any directory at compile time but the module must be in the application directory at run time. If the module isn't in the application directory at run time, you'll get a . `file` can't contain an assembly. For example, if the output file was created with [**TargetType**](output.md#targettype) option of **module**, its metadata can be imported with **AddModules**. +Where `file`, `file2` are output files that contain metadata. The file can't contain an assembly manifest. To import more than one file, separate file names with either a comma or a semicolon. All modules added with **AddModules** must be in the same directory as the output file at run time. That is, you can specify a module in any directory at compile time but the module must be in the application directory at run time. If the module isn't in the application directory at run time, you'll get a . `file` can't contain an assembly. For example, if the output file was created with [**OutputType**](output.md#outputtype) option of **module**, its metadata can be imported with **AddModules**. -If the output file was created with a [**TargetType**](output.md#targettype) option other than **module**, its metadata cannot be imported with **AddModules** but can be imported with the [**References**](#references) option. +If the output file was created with a [**OutputType**](output.md#outputtype) option other than **module**, its metadata cannot be imported with **AddModules** but can be imported with the [**References**](#references) option. ## EmbedInteropTypes diff --git a/docs/csharp/language-reference/compiler-options/output.md b/docs/csharp/language-reference/compiler-options/output.md index 1535d7d74a532..649cdb1bb2859 100644 --- a/docs/csharp/language-reference/compiler-options/output.md +++ b/docs/csharp/language-reference/compiler-options/output.md @@ -9,7 +9,7 @@ helpviewer_keywords: - "OutputAssembly compiler option [C#]" - "PlatformTarget compiler option [C#]" - "ProduceReferenceAssembly compiler option [C#]" - - "TargetType compiler option [C#]" + - "OutputType compiler option [C#]" --- # C# Compiler Options that control compiler output @@ -21,7 +21,7 @@ The following options control compiler output generation. | **OutputAssembly** | `-out:` | Specify the output assembly file. | | **PlatformTarget** | `-platform:` | Specify the target platform CPU. | | **ProduceReferenceAssembly** | `-refout:` | Generate a reference assembly. | -| **TargetType** | `-target:` | Specify the type of the output assembly. | +| **OutputType** | `-target:` | Specify the type of the output assembly. | > [!NOTE] > Refer to [Compiler options](index.md#how-to-set-options) for more information on configuring these options for your project. @@ -34,7 +34,7 @@ The **DocumentationFile** option allows you to place documentation comments in a path/to/file.xml ``` -The source code file that contains Main or top-level statements is output first into the XML. You'll often want to use the generated .xml file with [IntelliSense](/visualstudio/ide/using-intellisense). The *.xml* filename must be the same as the assembly name. The *.xml* file must be in the same directory as the assembly. When the assembly is referenced in a Visual Studio project, the *.xml* file is found as well. For more information about generating code comments, see [Supplying Code Comments](/visualstudio/ide/reference/generate-xml-documentation-comments). Unless you compile with [``](#targettype), `file` will contain `` and `` tags specifying the name of the file containing the assembly manifest for the output file. For examples, see [How to use the XML documentation features](../xmldoc/index.md). +The source code file that contains Main or top-level statements is output first into the XML. You'll often want to use the generated .xml file with [IntelliSense](/visualstudio/ide/using-intellisense). The *.xml* filename must be the same as the assembly name. The *.xml* file must be in the same directory as the assembly. When the assembly is referenced in a Visual Studio project, the *.xml* file is found as well. For more information about generating code comments, see [Supplying Code Comments](/visualstudio/ide/reference/generate-xml-documentation-comments). Unless you compile with [``](#outputtype), `file` will contain `` and `` tags specifying the name of the file containing the assembly manifest for the output file. For examples, see [How to use the XML documentation features](../xmldoc/index.md). > [!NOTE] > The **DocumentationFile** option applies to all files in the project. To disable warnings related to documentation comments for a specific file or section of code, use [#pragma warning](../preprocessor-directives.md#pragma-warning). @@ -43,13 +43,14 @@ This option can be used in any .NET SDK-style project. For more information, see ## OutputAssembly -The **OutputAssembly** option specifies the name of the output file. The output path specifies the folder where compiler output is placed. +The **OutputAssembly** option specifies the name of the output file. This option corresponds to the combination of the `OutputPath` and `AssemblyName` MSBuild properties that control where the compiled assembly is placed and what it's named. ```xml -folder +bin\Debug\ +MyApplication ``` -Specify the full name and extension of the file you want to create. If you don't specify the name of the output file, MSBuild uses the name of the project to specify the name of the output assembly. Old style projects use the following rules: +Specify the name and extension of the file you want to create. The path can be relative or absolute. If you don't specify the name of the output file, MSBuild uses the project name to specify the name of the output assembly. Old style projects use the following rules: - An .exe will take its name from the source code file that contains the `Main` method or top-level statements. - A .dll or .netmodule will take its name from the first source code file. @@ -103,9 +104,9 @@ You generally don't need to work directly with reference assembly files. By defa .NET SDK 6.0.200 made a [change](../../../core/compatibility/sdk/6.0/write-reference-assemblies-to-obj.md) that moved reference assemblies from the output directory to the intermediate directory by default. -## TargetType +## OutputType -The **TargetType** compiler option can be specified in one of the following forms: +The **OutputType** compiler option can be specified in one of the following forms: - **library**: to create a code library. **library** is the default value. - **exe**: to create an .exe file. @@ -118,7 +119,7 @@ The **TargetType** compiler option can be specified in one of the following form > For .NET Framework targets, unless you specify **module**, this option causes a .NET Framework assembly manifest to be placed in an output file. For more information, see [Assemblies in .NET](../../../standard/assembly/index.md) and [Common Attributes](../attributes/global.md). ```xml -library +library ``` The compiler creates only one assembly manifest per compilation. Information about all files in a compilation is placed in the assembly manifest. When producing multiple output files at the command line, only one assembly manifest can be created and it must go into the first output file specified on the command line. @@ -131,7 +132,7 @@ The **library** option causes the compiler to create a dynamic-link library (DLL ### exe -The **exe** option causes the compiler to create an executable (EXE), console application. The executable file will be created with the .exe extension. Use **winexe** to create a Windows program executable. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the entry point ([Main](../../fundamentals/program-structure/main-command-line.md) method or top-level statements). One and only one entry point is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#mainentrypoint-or-startupobject) compiler option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method. +The **exe** option causes the compiler to create an executable (EXE), console application. The executable file will be created with the .exe extension. Use **winexe** to create a Windows program executable. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the entry point ([Main](../../fundamentals/program-structure/main-command-line.md) method or top-level statements). One and only one entry point is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#startupobject) compiler option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method. ### module @@ -139,7 +140,7 @@ This option causes the compiler to not generate an assembly manifest. By default ### winexe -The **winexe** option causes the compiler to create an executable (EXE), Windows program. The executable file will be created with the .exe extension. A Windows program is one that provides a user interface from either the .NET library or with the Windows APIs. Use **exe** to create a console application. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the [`Main`](../../fundamentals/program-structure/main-command-line.md) method. One and only one `Main` method is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#mainentrypoint-or-startupobject) option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method. +The **winexe** option causes the compiler to create an executable (EXE), Windows program. The executable file will be created with the .exe extension. A Windows program is one that provides a user interface from either the .NET library or with the Windows APIs. Use **exe** to create a console application. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the [`Main`](../../fundamentals/program-structure/main-command-line.md) method. One and only one `Main` method is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#startupobject) option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method. ### winmdobj diff --git a/docs/csharp/language-reference/compiler-options/security.md b/docs/csharp/language-reference/compiler-options/security.md index c35a0bae7c059..cd58bbff2e12e 100644 --- a/docs/csharp/language-reference/compiler-options/security.md +++ b/docs/csharp/language-reference/compiler-options/security.md @@ -54,7 +54,7 @@ Specifies the filename containing the cryptographic key. filename ``` -`file` is the name of the file containing the strong name key. When this option is used, the compiler inserts the public key from the specified file into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. If you compile with [**-target:module**](output.md#targettype), the name of the key file is held in the module and incorporated into the assembly created when you compile an assembly with [**AddModules**](inputs.md#addmodules). You can also pass your encryption information to the compiler with [**KeyContainer**](#keycontainer). Use [**DelaySign**](#delaysign) if you want a partially signed assembly. In case both **KeyFile** and **KeyContainer** are specified in the same compilation, the compiler will first try the key container. If that succeeds, then the assembly is signed with the information in the key container. If the compiler doesn't find the key container, it will try the file specified with [**KeyFile**](#keyfile). If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container. On the next compilation, the key container will be valid. A key file might contain only the public key. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md). +`file` is the name of the file containing the strong name key. When this option is used, the compiler inserts the public key from the specified file into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. If you compile with [**-target:module**](output.md#outputtype), the name of the key file is held in the module and incorporated into the assembly created when you compile an assembly with [**AddModules**](inputs.md#addmodules). You can also pass your encryption information to the compiler with [**KeyContainer**](#keycontainer). Use [**DelaySign**](#delaysign) if you want a partially signed assembly. In case both **KeyFile** and **KeyContainer** are specified in the same compilation, the compiler will first try the key container. If that succeeds, then the assembly is signed with the information in the key container. If the compiler doesn't find the key container, it will try the file specified with [**KeyFile**](#keyfile). If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container. On the next compilation, the key container will be valid. A key file might contain only the public key. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md). ## KeyContainer @@ -64,7 +64,7 @@ Specifies the name of the cryptographic key container. container ``` -`container` is the name of the strong name key container. When the **KeyContainer** option is used, the compiler creates a sharable component. The compiler inserts a public key from the specified container into the assembly manifest and signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. `sn -i` installs the key pair into a container. This option isn't supported when the compiler runs on CoreCLR. To sign an assembly when building on CoreCLR, use the [**KeyFile**](#keyfile) option. If you compile with [**TargetType**](output.md#targettype), the name of the key file is held in the module and incorporated into the assembly when you compile this module into an assembly with [**AddModules**](inputs.md#addmodules). You can also specify this option as a custom attribute () in the source code for any common intermediate language (CIL) module. You can also pass your encryption information to the compiler with [**KeyFile**](#keyfile). Use [**DelaySign**](#delaysign) to add the public key to the assembly manifest but signing the assembly until it has been tested. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md). +`container` is the name of the strong name key container. When the **KeyContainer** option is used, the compiler creates a sharable component. The compiler inserts a public key from the specified container into the assembly manifest and signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. `sn -i` installs the key pair into a container. This option isn't supported when the compiler runs on CoreCLR. To sign an assembly when building on CoreCLR, use the [**KeyFile**](#keyfile) option. If you compile with [**OutputType**](output.md#outputtype), the name of the key file is held in the module and incorporated into the assembly when you compile this module into an assembly with [**AddModules**](inputs.md#addmodules). You can also specify this option as a custom attribute () in the source code for any common intermediate language (CIL) module. You can also pass your encryption information to the compiler with [**KeyFile**](#keyfile). Use [**DelaySign**](#delaysign) to add the public key to the assembly manifest but signing the assembly until it has been tested. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md). ## HighEntropyVA diff --git a/docs/csharp/misc/cs0017.md b/docs/csharp/misc/cs0017.md index f2010bd78c255..f0dc2808c4c88 100644 --- a/docs/csharp/misc/cs0017.md +++ b/docs/csharp/misc/cs0017.md @@ -16,7 +16,7 @@ Program 'output file name' has more than one entry point defined. Compile with / [!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)] - To resolve this error, you can either delete all Main methods in your code, except one, or you can use the [**StartupObject**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option to specify which Main method you want to use. + To resolve this error, you can either delete all Main methods in your code, except one, or you can use the [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option to specify which Main method you want to use. The following sample generates CS0017: diff --git a/docs/csharp/misc/cs0734.md b/docs/csharp/misc/cs0734.md index c68a2d0292d1d..b9f70786d26d3 100644 --- a/docs/csharp/misc/cs0734.md +++ b/docs/csharp/misc/cs0734.md @@ -14,7 +14,7 @@ The /moduleassemblyname option may only be specified when building a target type The compiler option **ModuleAssemblyName** should only be used when building a .netmodule. See [**ModuleAssemblyName** (C# Compiler Option)](../language-reference/compiler-options/advanced.md#moduleassemblyname) for more information. - For more information on building a .netmodule, see the **module** element for the [**TargetType** (C# Compiler Options)](../language-reference/compiler-options/output.md#targettype). + For more information on building a .netmodule, see the **module** element for the [**OutputType** (C# Compiler Options)](../language-reference/compiler-options/output.md#outputtype). ## Example diff --git a/docs/csharp/misc/cs1507.md b/docs/csharp/misc/cs1507.md index 30147f2140809..285fc2f040b7a 100644 --- a/docs/csharp/misc/cs1507.md +++ b/docs/csharp/misc/cs1507.md @@ -12,7 +12,7 @@ ms.assetid: e1be3aba-81dc-4f65-87a4-d3f90b82dc7d Cannot link resource file 'file' when building a module - [**LinkResources**](../language-reference/compiler-options/resources.md#linkresources) was used in the same compilation with the **module** option on the [**TargetType**](../language-reference/compiler-options/output.md#targettype), which is not allowed. For example, the following options would generate CS1507: + [**LinkResources**](../language-reference/compiler-options/resources.md#linkresources) was used in the same compilation with the **module** option on the [**OutputType**](../language-reference/compiler-options/output.md#outputtype), which is not allowed. For example, the following options would generate CS1507: ```console csc /linkresource:rf.resource /target:module in.cs diff --git a/docs/csharp/misc/cs1509.md b/docs/csharp/misc/cs1509.md index 29b4a72c3d4ba..8617f596a6c08 100644 --- a/docs/csharp/misc/cs1509.md +++ b/docs/csharp/misc/cs1509.md @@ -12,4 +12,4 @@ ms.assetid: 51a475c3-f085-49cb-89b0-c6582b68653f Referenced file 'file' is not an assembly; use **AddModules** option instead - An output file (output file 1), produced in a compilation that used the **module** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) (does not have an assembly manifest), was specified to [**References**](../language-reference/compiler-options/inputs.md#references). So, rather than appending an assembly to the assembly for the current program, the metadata information in output file 1 will be added to the assembly for the current program. + An output file (output file 1), produced in a compilation that used the **module** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) (does not have an assembly manifest), was specified to [**References**](../language-reference/compiler-options/inputs.md#references). So, rather than appending an assembly to the assembly for the current program, the metadata information in output file 1 will be added to the assembly for the current program. diff --git a/docs/csharp/misc/cs1542.md b/docs/csharp/misc/cs1542.md index 983e7f8a570d4..3fc6eaf440e76 100644 --- a/docs/csharp/misc/cs1542.md +++ b/docs/csharp/misc/cs1542.md @@ -12,4 +12,4 @@ ms.assetid: d7f60aa2-6645-472c-ac12-fa57a09fbd87 'dll' cannot be added to this assembly because it already is an assembly; use '/R' option instead - The file that was referenced with the [**AddModules**](../language-reference/compiler-options/inputs.md#addmodules) compiler option was not built with **module** element of the [**TargetType** compiler option](../language-reference/compiler-options/output.md#targettype); use [**References**](../language-reference/compiler-options/inputs.md#references) to reference the file in this compilation. + The file that was referenced with the [**AddModules**](../language-reference/compiler-options/inputs.md#addmodules) compiler option was not built with **module** element of the [**OutputType** compiler option](../language-reference/compiler-options/output.md#outputtype); use [**References**](../language-reference/compiler-options/inputs.md#references) to reference the file in this compilation. diff --git a/docs/csharp/misc/cs1555.md b/docs/csharp/misc/cs1555.md index 8af501306950b..529c097365e9b 100644 --- a/docs/csharp/misc/cs1555.md +++ b/docs/csharp/misc/cs1555.md @@ -12,6 +12,6 @@ ms.assetid: 1919c8b8-d72c-44af-91d0-674ccde77c3f Could not find 'class' specified for Main method -A class was specified to the [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option, but the class name was not found in the source code. +A class was specified to the [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option, but the class name was not found in the source code. [!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)] diff --git a/docs/csharp/misc/cs1556.md b/docs/csharp/misc/cs1556.md index 660ed92457c66..3d4fa10918502 100644 --- a/docs/csharp/misc/cs1556.md +++ b/docs/csharp/misc/cs1556.md @@ -12,6 +12,6 @@ ms.assetid: 960307d2-d815-4d7a-8f96-e3e78c038ade 'construct' specified for Main method must be a valid class or struct -The [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option was passed an identifier that was not a class name. +The [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option was passed an identifier that was not a class name. [!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)] diff --git a/docs/csharp/misc/cs1557.md b/docs/csharp/misc/cs1557.md index 67a1979e8108d..8789af92fd4f0 100644 --- a/docs/csharp/misc/cs1557.md +++ b/docs/csharp/misc/cs1557.md @@ -12,4 +12,4 @@ ms.assetid: 1615e028-aeb7-4788-bd87-8e49e502d698 Cannot use 'class' for Main method because it is in a different output file - The [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option was specified for one output file in a multi-output file compilation. However, the class was not found in the source code for the /main compilation; it was found in a source code file for one of the other output files in the compilation. + The [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option was specified for one output file in a multi-output file compilation. However, the class was not found in the source code for the /main compilation; it was found in a source code file for one of the other output files in the compilation. diff --git a/docs/csharp/misc/cs1558.md b/docs/csharp/misc/cs1558.md index 72dd2d7c3a86b..453ff79131e60 100644 --- a/docs/csharp/misc/cs1558.md +++ b/docs/csharp/misc/cs1558.md @@ -12,7 +12,7 @@ ms.assetid: ee603d66-007e-4782-9285-7ff031975f0f 'class' does not have a suitable static Main method -The [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option specified a class in which to look for a **Main** method. However, the [Main](../fundamentals/program-structure/main-command-line.md) method was not defined correctly. +The [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option specified a class in which to look for a **Main** method. However, the [Main](../fundamentals/program-structure/main-command-line.md) method was not defined correctly. [!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)] diff --git a/docs/csharp/misc/cs1559.md b/docs/csharp/misc/cs1559.md index 740923871cb21..9b552f0304cbd 100644 --- a/docs/csharp/misc/cs1559.md +++ b/docs/csharp/misc/cs1559.md @@ -12,4 +12,4 @@ ms.assetid: 08e6c183-4e92-44a5-99f1-4d1eef3d0a67 Cannot use 'object' for Main method because it is imported - An invalid class was specified to the [**StartupObject**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option; the class cannot be used as a location for the [Main](../fundamentals/program-structure/main-command-line.md) method. + An invalid class was specified to the [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option; the class cannot be used as a location for the [Main](../fundamentals/program-structure/main-command-line.md) method. diff --git a/docs/csharp/misc/cs1927.md b/docs/csharp/misc/cs1927.md index c4788aff1a0a3..705e42ab55a46 100644 --- a/docs/csharp/misc/cs1927.md +++ b/docs/csharp/misc/cs1927.md @@ -41,4 +41,4 @@ class ManifestWithModule ## See also - [**Win32Manifest** (C# Compiler Options)](../language-reference/compiler-options/resources.md#win32manifest) -- [**TargetType** module (C# Compiler Options)](../language-reference/compiler-options/output.md#targettype) +- [**OutputType** module (C# Compiler Options)](../language-reference/compiler-options/output.md#outputtype) diff --git a/docs/csharp/misc/cs2017.md b/docs/csharp/misc/cs2017.md index eb6a0b3c1e400..925335e336e27 100644 --- a/docs/csharp/misc/cs2017.md +++ b/docs/csharp/misc/cs2017.md @@ -12,7 +12,7 @@ ms.assetid: 16fd0c3b-018f-4734-809d-8d98d05a254c Cannot specify /main if building a module or library - You cannot specify a main entry point when you are building a **library** [**TargetType**](../language-reference/compiler-options/output.md#targettype). + You cannot specify a main entry point when you are building a **library** [**OutputType**](../language-reference/compiler-options/output.md#outputtype). The following sample generates CS2017: diff --git a/docs/csharp/misc/cs2019.md b/docs/csharp/misc/cs2019.md index ce7d02f2d4649..c7839b0261203 100644 --- a/docs/csharp/misc/cs2019.md +++ b/docs/csharp/misc/cs2019.md @@ -12,7 +12,7 @@ ms.assetid: eafd2531-8b3a-499c-9e12-a605a011396f Invalid target type for /target: must specify 'exe', 'winexe', 'library', or 'module' - The [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option was used, but an invalid parameter was passed. To resolve this error, recompile the program using the form of the **/target** option that is appropriate to your output file. + The [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option was used, but an invalid parameter was passed. To resolve this error, recompile the program using the form of the **/target** option that is appropriate to your output file. The following sample generates CS2017: diff --git a/docs/csharp/misc/cs2022.md b/docs/csharp/misc/cs2022.md index dcf3266a17395..d45785a9fc2ac 100644 --- a/docs/csharp/misc/cs2022.md +++ b/docs/csharp/misc/cs2022.md @@ -12,4 +12,4 @@ ms.assetid: d22de497-c4ef-466f-8fbc-6faba7ba5ad0 Options '/out' and '/target' must appear before source file names - The [**-out** (Set Output Filename)](../language-reference/compiler-options/output.md#outputassembly) and [-target (Specify Output File Format)](../language-reference/compiler-options/output.md#targettype) compiler options, when specified on the command line, must precede the source code files. + The [**-out** (Set Output Filename)](../language-reference/compiler-options/output.md#outputassembly) and [-target (Specify Output File Format)](../language-reference/compiler-options/output.md#outputtype) compiler options, when specified on the command line, must precede the source code files. diff --git a/docs/csharp/misc/cs3012.md b/docs/csharp/misc/cs3012.md index caabb9801fc43..c33aace161289 100644 --- a/docs/csharp/misc/cs3012.md +++ b/docs/csharp/misc/cs3012.md @@ -13,7 +13,7 @@ ms.assetid: 1f7555b4-61e4-4821-85c9-586301df4c5c You cannot specify the CLSCompliant attribute on a module that differs from the CLSCompliant attribute on the assembly -In order for a module to be compliant with the Common Language Specification (CLS) through `[module:System.CLSCompliant(true)]`, it must be built with the **module** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option. For more information on the CLS, see [Language independence and language-independent components](../../standard/language-independence.md). +In order for a module to be compliant with the Common Language Specification (CLS) through `[module:System.CLSCompliant(true)]`, it must be built with the **module** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option. For more information on the CLS, see [Language independence and language-independent components](../../standard/language-independence.md). ## Example diff --git a/docs/csharp/misc/cs3013.md b/docs/csharp/misc/cs3013.md index 2a4a5424de718..b31ee476d990d 100644 --- a/docs/csharp/misc/cs3013.md +++ b/docs/csharp/misc/cs3013.md @@ -12,6 +12,6 @@ ms.assetid: 00b3bbe1-f2a0-465c-be0e-1af700c5753d Added modules must be marked with the CLSCompliant attribute to match the assembly - A module that was compiled with the **module** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option was added to a compilation with [**AddModule**](../language-reference/compiler-options/inputs.md#addmodules). However, the module's compliance with the Common Language Specification (CLS) does not agree with the CLS state of the current compilation. + A module that was compiled with the **module** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option was added to a compilation with [**AddModule**](../language-reference/compiler-options/inputs.md#addmodules). However, the module's compliance with the Common Language Specification (CLS) does not agree with the CLS state of the current compilation. CLS compliance is indicated with the module attribute. For example, `[module:CLSCompliant(true)]` indicates that the module is CLS compliant, and `[module:CLSCompliant(false)]` indicates that the module is not CLS compliant. The default is `[module:CLSCompliant(false)]`. For more information on the CLS, see [Language independence and language-independent components](../../standard/language-independence.md). diff --git a/docs/csharp/misc/cs5001.md b/docs/csharp/misc/cs5001.md index 540ab0e923f75..1de27de9f055f 100644 --- a/docs/csharp/misc/cs5001.md +++ b/docs/csharp/misc/cs5001.md @@ -18,7 +18,7 @@ This error occurs when no static `Main` method with a correct signature is found If the `Main` method has an `async` modifier, make sure that the [selected C# language version](../language-reference/configure-language-version.md) is 7.1 or higher and to use `Task` or `Task` as the return type. -The `Main` method is only required when compiling an executable file, that is, when the **exe** or **winexe** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option is specified. The following Visual Studio project types specify one of these options by default: +The `Main` method is only required when compiling an executable file, that is, when the **exe** or **winexe** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option is specified. The following Visual Studio project types specify one of these options by default: - Console application - ASP.NET Core application diff --git a/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md b/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md index 14415575b34b5..632f742bef8a4 100644 --- a/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md +++ b/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md @@ -27,7 +27,7 @@ winmdexp [options] winmdmodule |Argument or option|Description| |------------------------|-----------------| -|`winmdmodule`|Specifies the module (.winmdobj) to be exported. Only one module is allowed. To create this module, use the `/target` compiler option with the `winmdobj` target. See [-target:winmdobj (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#targettype) or [-target (Visual Basic)](../../visual-basic/reference/command-line-compiler/target.md).| +|`winmdmodule`|Specifies the module (.winmdobj) to be exported. Only one module is allowed. To create this module, use the `/target` compiler option with the `winmdobj` target. See [-target:winmdobj (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#outputtype) or [-target (Visual Basic)](../../visual-basic/reference/command-line-compiler/target.md).| |`/docfile:` `docfile`

`/d:` `docfile`|Specifies the output XML documentation file that Winmdexp.exe will produce. In .NET Framework 4.5, the output file is essentially the same as the input XML documentation file.| |`/moduledoc:` `docfile`

`/md:` `docfile`|Specifies the name of the XML documentation file that the compiler produced with `winmdmodule`.| |`/modulepdb:` `symbolfile`

`/mp:` `symbolfile`|Specifies the name of the program database (PDB) file that contains symbols for `winmdmodule`.| diff --git a/docs/fsharp/language-reference/compiler-options.md b/docs/fsharp/language-reference/compiler-options.md index 24520a666475a..c13105387d159 100644 --- a/docs/fsharp/language-reference/compiler-options.md +++ b/docs/fsharp/language-reference/compiler-options.md @@ -57,7 +57,7 @@ The following table shows compiler options listed alphabetically. Some of the F# |`--staticlink:assembly-name`|Statically links the given assembly and all referenced DLLs that depend on this assembly. Use the assembly name, not the DLL name.| |`--subsystemversion`|Specifies the version of the OS subsystem to be used by the generated executable. Use 6.02 for Windows 8.1, 6.01 for Windows 7, 6.00 for Windows Vista. This option only applies to executables, not DLLs, and need only be used if your application depends on specific security features available only on certain versions of the OS. If this option is used, and a user attempts to execute your application on a lower version of the OS, it will fail with an error message.| |--tailcalls[+|-]|Enables or disables the use of the tail IL instruction, which causes the stack frame to be reused for tail recursive functions. This option is enabled by default.| -|--target:[exe|winexe|library|module] filename|Specifies the type and file name of the generated compiled code.
  • `exe` means a console application.
  • `winexe` means a Windows application, which differs from the console application in that it does not have standard input/output streams (stdin, stdout, and stderr) defined.
  • `library` is an assembly without an entry point.
  • `module` is a .NET Framework module (.netmodule), which can later be combined with other modules into an assembly.
    • This compiler option is equivalent to the C# compiler option of the same name. For more information, see [/target (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#targettype).| +|--target:[exe|winexe|library|module] filename|Specifies the type and file name of the generated compiled code.
      • `exe` means a console application.
      • `winexe` means a Windows application, which differs from the console application in that it does not have standard input/output streams (stdin, stdout, and stderr) defined.
      • `library` is an assembly without an entry point.
      • `module` is a .NET Framework module (.netmodule), which can later be combined with other modules into an assembly.
        • This compiler option is equivalent to the C# compiler option of the same name. For more information, see [/target (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#outputtype).| |`--times`|Displays timing information for compilation.| |`--utf8output`|Enables printing compiler output in the UTF-8 encoding.| |`--warn:warning-level`|Sets a warning level (0 to 5). The default level is 3. Each warning is given a level based on its severity. Level 5 gives more, but less severe, warnings than level 1.

          This compiler option is equivalent to the C# compiler option of the same name. For more information, see [/warn (C# Compiler Options)](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel).| From 46a330c488f0c23a78931e34b001a0f8b1db4da9 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:54:28 -0400 Subject: [PATCH 07/12] Document enum zero conversion dangers and provide validation guidance (#47737) * Initial plan * Add documentation and examples for enum zero conversion dangers Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Address review feedback: use ::: syntax, fix explanation, strengthen recommendation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../language-reference/builtin-types/enum.md | 14 ++++++ .../builtin-types/snippets/shared/EnumType.cs | 47 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/docs/csharp/language-reference/builtin-types/enum.md b/docs/csharp/language-reference/builtin-types/enum.md index 2fb7ebfa3eea2..236c8958cc45a 100644 --- a/docs/csharp/language-reference/builtin-types/enum.md +++ b/docs/csharp/language-reference/builtin-types/enum.md @@ -42,6 +42,20 @@ You cannot define a method inside the definition of an enumeration type. To add The default value of an enumeration type `E` is the value produced by expression `(E)0`, even if zero doesn't have the corresponding enum member. +## Implicit conversions from zero + +C# allows implicit conversions from the literal value `0` to any enum type, and from `const` values equal to zero. This behavior can lead to unexpected results when an enum doesn't include a member with the value zero: + +:::code language="csharp" source="snippets/shared/EnumType.cs" id="SnippetZeroConversions"::: + +In the preceding example, both `port1` and `port2` are assigned the value `0`, but `GpioPort` has no member with that value. The method confirms these are invalid enum values. + +This implicit conversion exists because the 0 bit pattern is the default for all struct types, including all enum types. However, it can introduce bugs in your code. To avoid these issues: + +- You should almost always define a member with value `0` in your enums. +- Use to validate enum values when converting from numeric types. +- Be cautious when using numeric parameters that might be implicitly converted to enum types. + You use an enumeration type to represent a choice from a set of mutually exclusive values or a combination of choices. To represent a combination of choices, define an enumeration type as bit flags. ## Enumeration types as bit flags diff --git a/docs/csharp/language-reference/builtin-types/snippets/shared/EnumType.cs b/docs/csharp/language-reference/builtin-types/snippets/shared/EnumType.cs index 4016a3a6f3d4d..0b638c3cbc8cf 100644 --- a/docs/csharp/language-reference/builtin-types/snippets/shared/EnumType.cs +++ b/docs/csharp/language-reference/builtin-types/snippets/shared/EnumType.cs @@ -8,6 +8,7 @@ public static void Examples() { FlagsEnumExample.Main(); EnumConversionExample.Main(); + ZeroConversionExample.Main(); } // @@ -76,4 +77,50 @@ public static void Main() } } // + + // + public enum GpioPort + { + GpioA = 1, + GpioB, + GpioC, + GpioD + } + + public class ZeroConversionExample + { + public static void Main() + { + // This compiles without warning but creates an invalid enum value + GpioPort port1 = (GpioPort)0; + Console.WriteLine($"port1: {port1}"); // Output: port1: 0 + + // This also compiles due to implicit conversion from zero + GpioPort port2 = GetPort(0); + Console.WriteLine($"port2: {port2}"); // Output: port2: 0 + + // Check if the enum value is valid + bool isValid1 = Enum.IsDefined(typeof(GpioPort), port1); + bool isValid2 = Enum.IsDefined(typeof(GpioPort), port2); + Console.WriteLine($"port1 is valid: {isValid1}"); // Output: port1 is valid: False + Console.WriteLine($"port2 is valid: {isValid2}"); // Output: port2 is valid: False + + // Safer approach - validate enum values + if (Enum.IsDefined(typeof(GpioPort), 0)) + { + GpioPort safePort = (GpioPort)0; + } + else + { + Console.WriteLine("Value 0 is not a valid GpioPort"); + // Handle the invalid case appropriately + } + } + + public static GpioPort GetPort(GpioPort port) + { + return port; + } + } + // } From e981f35f2a735f6bf3701f11588551c8faf8b748 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:24:35 -0400 Subject: [PATCH 08/12] Replace shared include file with platform-specific checksum validation instructions (#47869) * Initial plan * Add macOS-specific checksum validation instructions Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com> * Port checksum validation from include file to platform-specific articles Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com> * Apply suggestion from @adegeo * Apply suggestion from @adegeo * Fix broken image links by correcting media paths Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: adegeo <67293991+adegeo@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../includes/verify-download-macos-linux.md | 65 ------------------- docs/core/install/linux-scripted-manual.md | 55 +++++++++++++++- docs/core/install/macos.md | 54 ++++++++++++++- 3 files changed, 107 insertions(+), 67 deletions(-) delete mode 100644 docs/core/install/includes/verify-download-macos-linux.md diff --git a/docs/core/install/includes/verify-download-macos-linux.md b/docs/core/install/includes/verify-download-macos-linux.md deleted file mode 100644 index 4283bdd0afb52..0000000000000 --- a/docs/core/install/includes/verify-download-macos-linux.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -author: adegeo -ms.author: adegeo -ms.date: 11/14/2023 -ms.topic: include -ms.custom: linux-related-content ---- - -Use the `sha512sum` command to print the checksum of the file you've downloaded. For example, the following command reports the checksum of the _dotnet-sdk-8.0.100-linux-x64.tar.gz_ file: - -```bash -$ sha512sum dotnet-sdk-8.0.100-linux-x64.tar.gz -13905ea20191e70baeba50b0e9bbe5f752a7c34587878ee104744f9fb453bfe439994d38969722bdae7f60ee047d75dda8636f3ab62659450e9cd4024f38b2a5 dotnet-sdk-8.0.100-linux-x64.tar.gz -``` - -Compare the checksum with the value provided by the download site. - -> [!IMPORTANT] -> Even though a Linux file is shown in these examples, this information equally applies to macOS. - -### Use a checksum file to validate - -The .NET release notes contain a link to a checksum file you can use to validate your downloaded file. The following steps describe how to download the checksum file and validate a .NET install binary: - -01. The release notes page for .NET 8 on GitHub at contains a section named **Releases**. The table in that section links to the downloads and checksum files for each .NET 8 release: - - :::image type="content" source="../media/install-sdk/release-notes-root.png" alt-text="The github release notes version table for .NET"::: - -01. Select the link for the version of .NET that you downloaded. - - The previous section used .NET SDK 8.0.100, which is in the .NET 8.0.0 release. - -01. In the release page, you can see the .NET Runtime and .NET SDK version, and a link to the checksum file: - - :::image type="content" source="../media/install-sdk/release-notes-version.png" alt-text="The download table with checksums for .NET"::: - -01. Right-click on the **Checksum** link, and copy the link to your clipboard. - -01. Open a terminal. - -01. Use `curl -O {link}` to download the checksum file. - - Replace the link in the following command with the link you copied. - - ```bash - curl -O https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.0-sha.txt - ``` - -01. With both the checksum file and the .NET release file downloaded to the same directory, use the `sha512sum -c {file} --ignore-missing` command to validate the downloaded file. - - When validation passes, you see the file printed with the **OK** status: - - ```bash - $ sha512sum -c 8.0.0-sha.txt --ignore-missing - dotnet-sdk-8.0.100-linux-x64.tar.gz: OK - ``` - - If you see the file marked as **FAILED**, the file you downloaded isn't valid and shouldn't be used. - - ```bash - $ sha512sum -c 8.0.0-sha.txt --ignore-missing - dotnet-sdk-8.0.100-linux-x64.tar.gz: FAILED - sha512sum: WARNING: 1 computed checksum did NOT match - sha512sum: 8.0.0-sha.txt: no file was verified - ``` diff --git a/docs/core/install/linux-scripted-manual.md b/docs/core/install/linux-scripted-manual.md index c14dd4cbcfdf4..7aa51e0003bf6 100644 --- a/docs/core/install/linux-scripted-manual.md +++ b/docs/core/install/linux-scripted-manual.md @@ -162,7 +162,60 @@ To learn how to use the .NET CLI, see [.NET CLI overview](../tools/index.md). [!INCLUDE [verify-download-intro](includes/verify-download-intro.md)] -[!INCLUDE [verify-download-macos-linux](includes/verify-download-macos-linux.md)] +Use the `sha512sum` command to print the checksum of the file you've downloaded. For example, the following command reports the checksum of the _dotnet-sdk-8.0.100-linux-x64.tar.gz_ file: + +```bash +$ sha512sum dotnet-sdk-8.0.100-linux-x64.tar.gz +13905ea20191e70baeba50b0e9bbe5f752a7c34587878ee104744f9fb453bfe439994d38969722bdae7f60ee047d75dda8636f3ab62659450e9cd4024f38b2a5 dotnet-sdk-8.0.100-linux-x64.tar.gz +``` + +Compare the checksum with the value provided by the download site. + +### Use a checksum file to validate + +The .NET release notes contain a link to a checksum file you can use to validate your downloaded file. The following steps describe how to download the checksum file and validate a .NET install binary: + +01. The release notes page for .NET 8 on GitHub at contains a section named **Releases**. The table in that section links to the downloads and checksum files for each .NET 8 release: + + :::image type="content" source="media/install-sdk/release-notes-root.png" alt-text="The github release notes version table for .NET"::: + +01. Select the link for the version of .NET that you downloaded. + + The previous section used .NET SDK 8.0.100, which is in the .NET 8.0.0 release. + +01. In the release page, you can see the .NET Runtime and .NET SDK version, and a link to the checksum file: + + :::image type="content" source="media/install-sdk/release-notes-version.png" alt-text="The download table with checksums for .NET"::: + +01. Right-click on the **Checksum** link and copy it to your clipboard. + +01. Open a terminal. + +01. Use `curl -O {link}` to download the checksum file. + + Replace the link in the following command with the link you copied. + + ```bash + curl -O https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.0-sha.txt + ``` + +01. With both the checksum file and the .NET release file downloaded to the same directory, use the `sha512sum -c {file} --ignore-missing` command to validate the downloaded file. + + When validation passes, you see the file printed with the **OK** status: + + ```bash + $ sha512sum -c 8.0.0-sha.txt --ignore-missing + dotnet-sdk-8.0.100-linux-x64.tar.gz: OK + ``` + + If you see the file marked as **FAILED**, the file you downloaded isn't valid and shouldn't be used. + + ```bash + $ sha512sum -c 8.0.0-sha.txt --ignore-missing + dotnet-sdk-8.0.100-linux-x64.tar.gz: FAILED + sha512sum: WARNING: 1 computed checksum did NOT match + sha512sum: 8.0.0-sha.txt: no file was verified + ``` ## Set environment variables system-wide diff --git a/docs/core/install/macos.md b/docs/core/install/macos.md index 95271d3d0f883..d317f4e5af168 100644 --- a/docs/core/install/macos.md +++ b/docs/core/install/macos.md @@ -243,7 +243,59 @@ For more information about how enforced-notarization affects .NET (and your .NET [!INCLUDE [verify-download-intro](includes/verify-download-intro.md)] -[!INCLUDE [verify-download-macos-linux](includes/verify-download-macos-linux.md)] +Use the `shasum -a 512` command to print the checksum of the file you've downloaded. For example, the following command reports the checksum of the _dotnet-sdk-8.0.100-osx-x64.tar.gz_ file: + +```bash +$ shasum -a 512 dotnet-sdk-8.0.100-osx-x64.tar.gz +13905ea20191e70baeba50b0e9bbe5f752a7c34587878ee104744f9fb453bfe439994d38969722bdae7f60ee047d75dda8636f3ab62659450e9cd4024f38b2a5 dotnet-sdk-8.0.100-osx-x64.tar.gz +``` + +Compare the checksum with the value provided by the download site. + +### Use a checksum file to validate + +The .NET release notes contain a link to a checksum file you can use to validate your downloaded file. The following steps describe how to download the checksum file and validate a .NET install binary: + +01. The release notes page for .NET 8 on GitHub at contains a section named **Releases**. The table in that section links to the downloads and checksum files for each .NET 8 release: + + :::image type="content" source="media/install-sdk/release-notes-root.png" alt-text="The github release notes version table for .NET"::: + +01. Select the link for the version of .NET that you downloaded. + + The previous section used .NET SDK 8.0.100, which is in the .NET 8.0.0 release. + +01. In the release page, you can see the .NET Runtime and .NET SDK version, and a link to the checksum file: + + :::image type="content" source="media/install-sdk/release-notes-version.png" alt-text="The download table with checksums for .NET"::: + +01. Right-click on the **Checksum** link and copy it to your clipboard. + +01. Open a terminal. + +01. Use `curl -O {link}` to download the checksum file. + + Replace the link in the following command with the link you copied. + + ```bash + curl -O https://builds.dotnet.microsoft.com/dotnet/checksums/8.0.0-sha.txt + ``` + +01. With both the checksum file and the .NET release file downloaded to the same directory, use the `shasum -a 512 -c {file}` command to validate the downloaded file. + + When validation passes, you see the file printed with the **OK** status: + + ```bash + $ shasum -a 512 -c 8.0.0-sha.txt + dotnet-sdk-8.0.100-osx-x64.tar.gz: OK + ``` + + If you see the file marked as **FAILED**, the file you downloaded isn't valid and shouldn't be used. + + ```bash + $ shasum -a 512 -c 8.0.0-sha.txt + dotnet-sdk-8.0.100-osx-x64.tar.gz: FAILED + shasum: WARNING: 1 computed checksum did NOT match + ``` ## Arm-based Macs From e29c3740695c515938040aa0697d96eeeaddeba8 Mon Sep 17 00:00:00 2001 From: Xulei Liu Date: Thu, 7 Aug 2025 22:26:48 +0200 Subject: [PATCH 09/12] Remove `the` before `event`. (#47880) --- docs/csharp/event-pattern.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/event-pattern.md b/docs/csharp/event-pattern.md index 0116f1326c01a..af5ea98ff8e9d 100644 --- a/docs/csharp/event-pattern.md +++ b/docs/csharp/event-pattern.md @@ -72,7 +72,7 @@ Two different patterns could be used, based on the semantics of the Cancel contr One pattern would allow any one subscriber to cancel the operation. For this pattern, the new field is initialized to `false`. Any subscriber can change it to `true`. After the raising the event for all subscribers, the FileSearcher component examines the boolean value and takes action. -The second pattern would only cancel the operation if all subscribers wanted the operation canceled. In this pattern, the new field is initialized to indicate the operation should cancel, and any subscriber could change it to indicate the operation should continue. After all subscribers process the raised the event, the FileSearcher component examines the boolean and takes action. There's one extra step in this pattern: the component needs to know if any subscribers responded to the event. If there are no subscribers, the field would indicate a cancel incorrectly. +The second pattern would only cancel the operation if all subscribers wanted the operation canceled. In this pattern, the new field is initialized to indicate the operation should cancel, and any subscriber could change it to indicate the operation should continue. After all subscribers process the raised event, the FileSearcher component examines the boolean and takes action. There's one extra step in this pattern: the component needs to know if any subscribers responded to the event. If there are no subscribers, the field would indicate a cancel incorrectly. Let's implement the first version for this sample. You need to add a boolean field named `CancelRequested` to the `FileFoundArgs` type: From c7b9a64e33c20edd89fa48c29ba66e09e9eae104 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:30:39 -0700 Subject: [PATCH 10/12] Update package index with latest published versions (#47882) --- docs/azure/includes/dotnet-all.md | 16 ++++++++-------- docs/azure/includes/dotnet-new.md | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 4a870b3881a36..00e408a8afb99 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -79,7 +79,7 @@ | Monitor Query | NuGet [1.7.0](https://www.nuget.org/packages/Azure.Monitor.Query/1.7.0) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.7.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.7.0/sdk/monitor/Azure.Monitor.Query/) | | NUnit ? Microsoft Playwright Testing | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Developer.MicrosoftPlaywrightTesting.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.NUnit_1.0.0-beta.4/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/) | | OpenAI Assistants | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/AI.OpenAI.Assistants-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI.Assistants_1.0.0-beta.4/sdk/openai/Azure.AI.OpenAI.Assistants/) | -| OpenAI Inference | NuGet [2.1.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0)
          NuGet [2.2.0-beta.5](https://www.nuget.org/packages/Azure.AI.OpenAI/2.2.0-beta.5) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0/sdk/openai/Azure.AI.OpenAI/)
          GitHub [2.2.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.2.0-beta.5/sdk/openai/Azure.AI.OpenAI/) | +| OpenAI Inference | NuGet [2.1.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0)
          NuGet [2.3.0-beta.1](https://www.nuget.org/packages/Azure.AI.OpenAI/2.3.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0/sdk/openai/Azure.AI.OpenAI/)
          GitHub [2.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.3.0-beta.1/sdk/openai/Azure.AI.OpenAI/) | | OpenTelemetry AspNetCore | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.3.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.AspNetCore-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.3.0/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | | OpenTelemetry Exporter | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.4.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.Exporter-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.4.0/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | | Personalizer | NuGet [2.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Personalizer/2.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Personalizer-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [2.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Personalizer_2.0.0-beta.2/sdk/personalizer/Azure.AI.Personalizer/) | @@ -325,7 +325,7 @@ | Resource Management - Playwright Testing | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PlaywrightTesting/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PlaywrightTesting-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PlaywrightTesting_1.0.0/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/) | | Resource Management - Policy Insights | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.PolicyInsights/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PolicyInsights-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PolicyInsights_1.2.1/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/) | | Resource Management - Portalservicescopilot | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.PortalServicesCopilot/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PortalServicesCopilot-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PortalServicesCopilot_1.0.0-beta.1/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/) | -| Resource Management - PostgreSQL | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.3.0/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | +| Resource Management - PostgreSQL | NuGet [1.3.1](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.3.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.3.1/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | | Resource Management - Power BI Dedicated | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.PowerBIDedicated/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.PowerBIDedicated-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PowerBIDedicated_1.0.0-beta.5/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/) | | Resource Management - Private DNS | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.PrivateDns/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PrivateDns-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PrivateDns_1.2.1/sdk/privatedns/Azure.ResourceManager.PrivateDns/) | | Resource Management - Provider Hub | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.ProviderHub/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ProviderHub-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ProviderHub_1.1.1/sdk/providerhub/Azure.ResourceManager.ProviderHub/) | @@ -402,8 +402,8 @@ | IoT Operations MQTT | NuGet [0.11.0](https://www.nuget.org/packages/Azure.Iot.Operations.Mqtt/0.11.0) | | | | IoT Operations Protocol | NuGet [0.12.0](https://www.nuget.org/packages/Azure.Iot.Operations.Protocol/0.12.0) | | | | IoT Operations Services | NuGet [0.13.0](https://www.nuget.org/packages/Azure.Iot.Operations.Services/0.13.0) | | | -| Item Templates NetCore | NuGet [4.0.5196](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetCore/4.0.5196) | | | -| Item Templates NetFx | NuGet [4.0.5196](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetFx/4.0.5196) | | | +| Item Templates NetCore | NuGet [4.0.5212](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetCore/4.0.5212) | | | +| Item Templates NetFx | NuGet [4.0.5212](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates.NetFx/4.0.5212) | | | | Microsoft.Azure.DataFactoryTestingFramework.Expressions | NuGet [0.2.7](https://www.nuget.org/packages/Microsoft.Azure.DataFactoryTestingFramework.Expressions/0.2.7) | | | | Microsoft.Azure.Functions.Worker.OpenTelemetry | NuGet [1.1.0-preview6](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.OpenTelemetry/1.1.0-preview6) | | | | OpenTelemetry Profiler | NuGet [1.0.0-beta5](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Profiler/1.0.0-beta5) | | | @@ -528,10 +528,10 @@ | Functions Extensions - Redis | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Redis/1.0.0) | | | | Functions Extensions - Redis | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Redis/1.0.0) | | | | Functions Extensions - Worker Extentions | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Dapr/1.0.1) | | | -| Functions item template pack for Microsoft Template Engine | NuGet [4.0.5196](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ItemTemplates/4.0.5196) | | GitHub [4.0.5196](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | +| Functions item template pack for Microsoft Template Engine | NuGet [4.0.5212](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ItemTemplates/4.0.5212) | | GitHub [4.0.5212](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | | Functions OpenAPI app settings deserialization library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/1.4.0)
          NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi.Configuration.AppSettings/2.0.0-preview2) | | | | Functions OpenAPI document and Swagger UI renderer library | NuGet [1.4.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/1.4.0)
          NuGet [2.0.0-preview2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.OpenApi/2.0.0-preview2) | | | -| Functions project template pack for Microsoft Template Engine | NuGet [4.0.5196](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ProjectTemplates/4.0.5196) | | GitHub [4.0.5196](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | +| Functions project template pack for Microsoft Template Engine | NuGet [4.0.5212](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.ProjectTemplates/4.0.5212) | | GitHub [4.0.5212](https://github.com/Azure/azure-functions-templates/tree/3.1.1582) | | Functions runtime assemblies for App Insights logging | NuGet [3.0.41](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/3.0.41) | | GitHub [3.0.41](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights) | | Functions runtime assemblies for logging | NuGet [4.0.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging/4.0.3) | | GitHub [4.0.3](https://github.com/Azure/azure-webjobs-sdk/tree/dev/src/Microsoft.Azure.WebJobs.Logging) | | Functions runtime assemblies for Microsoft.Azure.WebJobs.Host | NuGet [3.0.41](https://www.nuget.org/packages/Microsoft.Azure.WebJobs/3.0.41) | | GitHub [3.0.41](https://github.com/Azure/azure-webjobs-sdk/tree/v3.0.18/src/Microsoft.Azure.WebJobs) | @@ -565,8 +565,8 @@ | Microsoft.Azure.Functions.Worker.Extensions.Timer | NuGet [4.3.1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Timer/4.3.1) | | | | Microsoft.Azure.Functions.Worker.Extensions.Warmup | NuGet [4.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Warmup/4.0.2) | | | | Microsoft.Azure.Functions.Worker.Grpc | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/2.0.0)
          NuGet [2.50.0-preview1](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Grpc/2.50.0-preview1) | | | -| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.5196](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.5196) | | | -| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.5196](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.5196) | | | +| Microsoft.Azure.Functions.Worker.ItemTemplates | NuGet [4.0.5212](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ItemTemplates/4.0.5212) | | | +| Microsoft.Azure.Functions.Worker.ProjectTemplates | NuGet [4.0.5212](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.ProjectTemplates/4.0.5212) | | | | Microsoft.Azure.Functions.Worker.Sdk | NuGet [2.0.5](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/2.0.5) | | | | Microsoft.Azure.Functions.Worker.Sdk.Analyzers | NuGet [1.2.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Analyzers/1.2.2) | | | | Microsoft.Azure.Functions.Worker.Sdk.Generators | NuGet [1.3.5](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk.Generators/1.3.5) | | | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 10d29f33ca3eb..db1108b8c237a 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -81,7 +81,7 @@ | Monitor Query | NuGet [1.7.0](https://www.nuget.org/packages/Azure.Monitor.Query/1.7.0) | [docs](/dotnet/api/overview/azure/Monitor.Query-readme) | GitHub [1.7.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.Query_1.7.0/sdk/monitor/Azure.Monitor.Query/) | | NUnit ? Microsoft Playwright Testing | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Developer.MicrosoftPlaywrightTesting.NUnit-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.MicrosoftPlaywrightTesting.NUnit_1.0.0-beta.4/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting.NUnit/) | | OpenAI Assistants | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.AI.OpenAI.Assistants/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/AI.OpenAI.Assistants-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI.Assistants_1.0.0-beta.4/sdk/openai/Azure.AI.OpenAI.Assistants/) | -| OpenAI Inference | NuGet [2.1.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0)
          NuGet [2.2.0-beta.5](https://www.nuget.org/packages/Azure.AI.OpenAI/2.2.0-beta.5) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0/sdk/openai/Azure.AI.OpenAI/)
          GitHub [2.2.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.2.0-beta.5/sdk/openai/Azure.AI.OpenAI/) | +| OpenAI Inference | NuGet [2.1.0](https://www.nuget.org/packages/Azure.AI.OpenAI/2.1.0)
          NuGet [2.3.0-beta.1](https://www.nuget.org/packages/Azure.AI.OpenAI/2.3.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.OpenAI-readme) | GitHub [2.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.1.0/sdk/openai/Azure.AI.OpenAI/)
          GitHub [2.3.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.OpenAI_2.3.0-beta.1/sdk/openai/Azure.AI.OpenAI/) | | OpenTelemetry AspNetCore | NuGet [1.3.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/1.3.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.AspNetCore-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.AspNetCore_1.3.0/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/) | | OpenTelemetry Exporter | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/1.4.0) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.Exporter-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.Exporter_1.4.0/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/) | | OpenTelemetry LiveMetrics | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.LiveMetrics/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Monitor.OpenTelemetry.LiveMetrics-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Monitor.OpenTelemetry.LiveMetrics_1.0.0-beta.3/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/) | @@ -336,7 +336,7 @@ | Resource Management - Playwright Testing | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.PlaywrightTesting/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PlaywrightTesting-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PlaywrightTesting_1.0.0/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/) | | Resource Management - Policy Insights | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.PolicyInsights/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PolicyInsights-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PolicyInsights_1.2.1/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/) | | Resource Management - Portalservicescopilot | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.PortalServicesCopilot/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PortalServicesCopilot-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PortalServicesCopilot_1.0.0-beta.1/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/) | -| Resource Management - PostgreSQL | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.3.0/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | +| Resource Management - PostgreSQL | NuGet [1.3.1](https://www.nuget.org/packages/Azure.ResourceManager.PostgreSql/1.3.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PostgreSql-readme) | GitHub [1.3.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PostgreSql_1.3.1/sdk/postgresql/Azure.ResourceManager.PostgreSql/) | | Resource Management - Power BI Dedicated | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.PowerBIDedicated/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.PowerBIDedicated-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PowerBIDedicated_1.0.0-beta.5/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/) | | Resource Management - Private DNS | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.PrivateDns/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.PrivateDns-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.PrivateDns_1.2.1/sdk/privatedns/Azure.ResourceManager.PrivateDns/) | | Resource Management - Provider Hub | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.ProviderHub/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.ProviderHub-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ProviderHub_1.1.1/sdk/providerhub/Azure.ResourceManager.ProviderHub/) | From 7e35b03a021e26e450f4d27f02c3efb697ff5058 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:12:56 -0700 Subject: [PATCH 11/12] Add breaking change documentation for Console JSON logging duplicate messages (#47741) --- docs/core/compatibility/10.0.md | 1 + ...console-json-logging-duplicate-messages.md | 79 +++++++++++++++++++ docs/core/compatibility/toc.yml | 6 +- 3 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 docs/core/compatibility/extensions/10.0/console-json-logging-duplicate-messages.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 1b71ea787cc16..304f370527f5a 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -41,6 +41,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | Title | Type of change | Introduced version | |-------|---------------------|--------------------| +| [Message no longer duplicated in Console log output](extensions/10.0/console-json-logging-duplicate-messages.md) | Behavioral change | Preview 7 | | [ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly](extensions/10.0/provideraliasattribute-moved-assembly.md) | Source incompatible | Preview 4 | | [Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code](extensions/10.0/dynamically-accessed-members-configuration.md) | Binary incompatible | Preview 6 | diff --git a/docs/core/compatibility/extensions/10.0/console-json-logging-duplicate-messages.md b/docs/core/compatibility/extensions/10.0/console-json-logging-duplicate-messages.md new file mode 100644 index 0000000000000..ae33060e537b6 --- /dev/null +++ b/docs/core/compatibility/extensions/10.0/console-json-logging-duplicate-messages.md @@ -0,0 +1,79 @@ +--- +title: "Breaking change: Message no longer duplicated in Console log output" +description: "Learn about the breaking change in .NET 10 where `Message` is no longer duplicated in Console log output using the JSON formatter." +ms.date: 08/07/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/47006 +--- + +# Message no longer duplicated in Console log output + +When logging to the console using the JSON formatter, log messages are no longer duplicated in the log output. Previously, messages typically appeared three times: once as the top-level `Message`, again within the `State` object, and a third time as the original format string. + +## Version introduced + +.NET 10 Preview 7 + +## Previous behavior + +Previously, when using a console logger configured with the JSON formatter, log messages were duplicated in the output. For example, the code `logger.LogInformation("This is an information message.");` produced the following output: + +```json +{ + "EventId": 0, + "LogLevel": "Information", + "Category": "Program", + "Message": "This is an information message.", + "State": { + "Message": "This is an information message.", + "{OriginalFormat}": "This is an information message." + } +} +``` + +As you can see, `Message` appears twice: once as the top-level `Message` and again inside the `State` object. + +## New behavior + +Starting in .NET 10, `Message` appears only at the top level and not inside the `State` object (typically). The log output looks like this: + +```json +{ + "EventId": 0, + "LogLevel": "Information", + "Category": "Program", + "Message": "This is an information message.", + "State": { + "{OriginalFormat}": "This is an information message." + } +} +``` + +## Type of breaking change + +This is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The goal of this change is to reduce unnecessary logging overhead by eliminating duplicate content. By avoiding repeated formatting of the same message, the change helps: + +- Minimize log output size. +- Reduce confusion caused by redundant information. +- Improve performance by preventing multiple formatting operations for the same message. + +Overall, this results in cleaner, more efficient, and easier-to-read logs. + +## Recommended action + +If you previously parsed the logging output to extract the `Message` from within the `State` object, it's safe to use the top-level `Message` instead, now that duplication has been removed. + +> [!NOTE] +> In some cases, a `Message` might still appear within the `State` object. This typically happens when its content differs from the top-level `Message`. + +## Affected APIs + +- +- +- +- +- diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index bef069b8a508c..e34dc4c2a4639 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -50,9 +50,11 @@ items: href: cryptography/10.0/x509-publickey-null.md - name: Extensions items: - - name: "ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly" + - name: Message no longer duplicated in Console log output + href: extensions/10.0/console-json-logging-duplicate-messages.md + - name: ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly href: extensions/10.0/provideraliasattribute-moved-assembly.md - - name: "Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code" + - name: Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code href: extensions/10.0/dynamically-accessed-members-configuration.md - name: Globalization items: From 99ce0718695bdc617ffe77d7ebfd62d893d43a53 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:17:22 +0000 Subject: [PATCH 12/12] Add breaking change documentation for preserving null values in configuration (#47742) --- docs/core/compatibility/10.0.md | 1 + .../configuration-null-values-preserved.md | 118 ++++++++++++++++++ docs/core/compatibility/toc.yml | 2 + 3 files changed, 121 insertions(+) create mode 100644 docs/core/compatibility/extensions/10.0/configuration-null-values-preserved.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 304f370527f5a..20f2f59c9a226 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -41,6 +41,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | Title | Type of change | Introduced version | |-------|---------------------|--------------------| +| [Null values preserved in configuration](extensions/10.0/configuration-null-values-preserved.md) | Behavioral change | Preview 7 | | [Message no longer duplicated in Console log output](extensions/10.0/console-json-logging-duplicate-messages.md) | Behavioral change | Preview 7 | | [ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly](extensions/10.0/provideraliasattribute-moved-assembly.md) | Source incompatible | Preview 4 | | [Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code](extensions/10.0/dynamically-accessed-members-configuration.md) | Binary incompatible | Preview 6 | diff --git a/docs/core/compatibility/extensions/10.0/configuration-null-values-preserved.md b/docs/core/compatibility/extensions/10.0/configuration-null-values-preserved.md new file mode 100644 index 0000000000000..aea7ee007a2e4 --- /dev/null +++ b/docs/core/compatibility/extensions/10.0/configuration-null-values-preserved.md @@ -0,0 +1,118 @@ +--- +title: "Breaking change: Null values preserved in configuration" +description: "Learn about the breaking change in .NET 10 where configuration providers now preserve null values instead of treating them as missing values." +ms.date: 08/07/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/46890 +--- + +# Null values preserved in configuration + +The .NET configuration binder retrieves configuration values via configuration providers and attempts to bind those values to object properties. Previously, when a configuration value was null, the binder treated it as if the value didn't exist at all, and therefore skipped the binding. In other words, it did not distinguish between `null` values and missing values. This behavior caused significant confusion for users who expected explicitly defined `null` values in their configuration to be respected and properly bound. + +Additionally, the JSON configuration provider previously converted `null` values in the configuration to empty strings. This further contributed to confusion, as properties bound to these values would receive an empty string rather than the expected null. + +This change addresses both issues. The JSON configuration provider now correctly reports `null` values without altering them, and the binder treats `null` values as valid inputs, binding them like any other value. + +The update also includes improvements to support binding `null` values within arrays and enables binding of empty arrays. + +## Version introduced + +.NET 10 Preview 7 + +## Previous behavior + +Previously, when a configuration value was `null`, the binder treated it as if the value didn't exist at all, and therefore skipped the binding. The system didn't distinguish between `null` values and missing values. + +Additionally, the JSON configuration provider converted `null` values in the configuration to empty strings. This caused properties bound to these values to receive an empty string rather than the expected `null`. + +Consider the following configuration file `appsettings.json` contents: + +```json +{ + "NullConfiguration": { + "StringProperty": null, + "IntProperty": null, + "Array1": [null, null], + "Array2": [] + } +} +``` + +And the corresponding binding code: + +```csharp +public class NullConfiguration +{ + public NullConfiguration() + { + // Initialize with non-default value to + // ensure binding overrides these values. + StringProperty = "Initial Value"; + IntProperty = 123; + } + public string? StringProperty { get; set; } + public int? IntProperty { get; set; } + public string[]? Array1 { get; set; } + public string[]? Array2 { get; set; } +} + +var configuration = new ConfigurationBuilder() + .AddJsonFile("appsettings.json") + .Build().GetSection("NullConfiguration"); + +// Now bind the configuration. +NullConfiguration? result = configuration.Get(); + +Console.WriteLine($"StringProperty: '{result!.StringProperty}', intProperty: {(result!.IntProperty.HasValue ? result!.IntProperty : "null")}"); +Console.WriteLine($"Array1: {(result!.Array1 is null ? + "null" : string.Join(", ", result!.Array1.Select(a => $"'{(a is null ? "null" : a)}'")))}"); +Console.WriteLine($"Array2: {(result!.Array2 is null ? + "null" : string.Join(", ", result!.Array2.Select(a => $"'{(a is null ? "null" : a)}'")))}"); +``` + +Output: + +```txt +StringProperty: '', intProperty: 123 +Array1: '', '' +Array2: null +``` + +Explanation of the output: + +- `StringProperty`: The `null` value in the JSON was converted by the JSON provider into an empty string (""), overwriting the initial value. +- `IntProperty`: Remained unchanged (123) because the provider converted `null` to an empty string, which couldn't be parsed as an `int?`, so the original value was retained. +- `Array1`: Bound to an array containing two empty strings because each `null` array element was treated as an empty string. +- `Array2`: Remained `null` since an empty array `[]` in the JSON was ignored by the binder. + +## New behavior + +Starting in .NET 10, `null` values are now properly bound to their corresponding properties, including array elements. Even empty arrays are correctly recognized and bound as empty arrays rather than being ignored. + +Running the same code sample produces the following results using the JSON configuration provider: + +```txt +StringProperty: 'null', intProperty: null +Array1: 'null', 'null' +Array2: +``` + +## Type of breaking change + +This is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +The previous behavior was confusing and frequently led to user complaints. By addressing this issue, the configuration binding process is now more intuitive and consistent, reducing confusion and aligning the behavior with user expectations. + +## Recommended action + +If you prefer the previous behavior, you can adjust your configuration accordingly: + +- When using the JSON configuration provider, replace `null` values with empty strings (`""`) to restore the original behavior, where empty strings are bound instead of `null`. +- For other providers that support `null` values, remove the `null` entries from the configuration to replicate the earlier behavior, where missing values are ignored and existing property values remain unchanged. + +## Affected APIs + +- APIs diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index e34dc4c2a4639..e76f2eb1a168a 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -52,6 +52,8 @@ items: items: - name: Message no longer duplicated in Console log output href: extensions/10.0/console-json-logging-duplicate-messages.md + - name: Null values preserved in configuration + href: extensions/10.0/configuration-null-values-preserved.md - name: ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly href: extensions/10.0/provideraliasattribute-moved-assembly.md - name: Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code