diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 8971e84d88dbd..08a02557716d9 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -55,7 +55,7 @@ { "path_to_root": "_csharpstandard", "url": "https://github.com/dotnet/csharpstandard", - "branch": "alpha-v12", + "branch": "alpha-v13", "include_in_build": true, "branch_mapping": {} }, diff --git a/.openpublishing.redirection.csharp.json b/.openpublishing.redirection.csharp.json index b3feedae1279f..854d17b31097d 100644 --- a/.openpublishing.redirection.csharp.json +++ b/.openpublishing.redirection.csharp.json @@ -590,6 +590,30 @@ "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs7000.md", "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors" }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8124.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8125.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8127.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8139.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8140.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8141.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, { "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8145.md", "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/property-declaration-errors" @@ -638,6 +662,10 @@ "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8178.md", "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/async-await-errors" }, + { + "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8210.md", + "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/tuple-errors" + }, { "source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs8373.md", "redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors" diff --git a/docfx.json b/docfx.json index 44628c59fdabe..3a09a642830b8 100644 --- a/docfx.json +++ b/docfx.json @@ -49,7 +49,6 @@ }, { "files": [ - "csharp-13.0/*.md", "csharp-14.0/*.md", "csharp-15.0/*.md", "unsafe-evolution.md" @@ -502,8 +501,7 @@ "docs/visual-basic/**/**.{md,yml}": "wiwagn" }, "ms.date": { - "_csharpstandard/standard/*.md": "08/12/2026", - "_csharplang/proposals/csharp-13.0/*.md": "10/31/2024", + "_csharpstandard/standard/*.md": "08/19/2026", "_csharplang/proposals/csharp-14.0/*.md": "08/06/2025", "_csharplang/proposals/csharp-15.0/*.md": "08/12/2026", "_csharplang/proposals/*.md": "08/12/2026", @@ -615,15 +613,6 @@ "_csharpstandard/standard/standard-library.md": "Standard library", "_csharpstandard/standard/documentation-comments.md": "Documentation comments", "_csharpstandard/standard/Bibliography.md": "Bibliography", - "_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md": "Better conversion from collection expression", - "_csharplang/proposals/csharp-13.0/esc-escape-sequence.md": "String/Character escape sequence '\\e'", - "_csharplang/proposals/csharp-13.0/lock-object.md": "Obey lock object semantics for lock statements", - "_csharplang/proposals/csharp-13.0/method-group-natural-type-improvements.md": "Method group natural type improvements", - "_csharplang/proposals/csharp-13.0/params-collections.md": "Params collections", - "_csharplang/proposals/csharp-13.0/ref-unsafe-in-iterators-async.md": "Allow ref and unsafe in iterators and async methods", - "_csharplang/proposals/csharp-13.0/ref-struct-interfaces.md": "Allow ref struct types to implement some interfaces", - "_csharplang/proposals/csharp-13.0/partial-properties.md": "All partial properties and indexers", - "_csharplang/proposals/csharp-13.0/overload-resolution-priority.md": "Overload resolution priority tiebreaker attribute", "_csharplang/proposals/csharp-14.0/field-keyword.md": "The `field` contextual keyword", "_csharplang/proposals/csharp-14.0/unbound-generic-types-in-nameof.md": "Unbound generic types in `nameof`", "_csharplang/proposals/csharp-14.0/first-class-span-types.md": "First-class span types", @@ -695,15 +684,6 @@ "_csharpstandard/standard/standard-library.md": "This appendix lists requirements of the specification library. The C# language relies on these types for some of its behavior.", "_csharpstandard/standard/documentation-comments.md": "This appendix describes XML comments that are used to document your program.", "_csharpstandard/standard/Bibliography.md": "This appendix lists external standards referenced in this specification.", - "_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md": "Conversions from collection expressions match the element type before matching the collection type.", - "_csharplang/proposals/csharp-13.0/esc-escape-sequence.md" : "The sequence '\\e' is now interpreted as the 'ESC' character, character point '0x1b'", - "_csharplang/proposals/csharp-13.0/lock-object.md": "Special-case how `System.Threading.Lock` interacts with the `lock` keyword by calling its `EnterScope` method. Add static analysis warnings to prevent accidental misuse of the type where possible.", - "_csharplang/proposals/csharp-13.0/method-group-natural-type-improvements.md": "This proposal refines the determination of the natural type of a method group by considering candidates scope-by-scope and pruning at each scope.", - "_csharplang/proposals/csharp-13.0/params-collections.md": "Allow the `params` modifier on collection types beyond arrays, including `IEnumerable` types.", - "_csharplang/proposals/csharp-13.0/ref-unsafe-in-iterators-async.md": "This proposal modifies restrictions to enable ref local variables and unsafe blocks in iterators and async methods", - "_csharplang/proposals/csharp-13.0/ref-struct-interfaces.md": "This proposal provides features that enable interface authors to allow `ref struct` types to implement a particular interface", - "_csharplang/proposals/csharp-13.0/partial-properties.md": "This proposal provides for partial properties and indexers, allowing the definition of a property or indexer to be split across multiple parts.", - "_csharplang/proposals/csharp-13.0/overload-resolution-priority.md": "This proposal introduces a new attribute, `OverloadResolutionPriorityAttribute`, that can be applied to methods to influence overload resolution.", "_csharplang/proposals/csharp-14.0/field-keyword.md": "This proposal introduces a new keyword, `field`, that accesses the compiler generated backing field in a property accessor.", "_csharplang/proposals/csharp-14.0/unbound-generic-types-in-nameof.md": "This proposal introduces the ability to use unbound generic types such as `List<>` in `nameof` expressions. The type argument isn't required.", "_csharplang/proposals/csharp-14.0/first-class-span-types.md": "This proposal provides several implicit conversions to `Span` and `ReadOnlySpan` that enable library authors to have fewer overloads and developers to write code that resolves to faster Span based APIs", @@ -744,7 +724,6 @@ "titleSuffix": { "docs/**/*.{md,yml}": ".NET", "_csharpstandard/standard/*.md": "C# language specification", - "_csharplang/proposals/csharp-13.0/*.md": "C# feature specifications", "_csharplang/proposals/csharp-14.0/*.md": "C# feature specifications", "_csharplang/proposals/csharp-15.0/*.md": "C# feature specifications", "_csharplang/proposals/*.md": "C# feature specifications (preview)", diff --git a/docs/ai/evaluation/snippets/evaluate-with-reporting/TestAIWithReporting.csproj b/docs/ai/evaluation/snippets/evaluate-with-reporting/TestAIWithReporting.csproj index 96093d9c7962b..07623379df2e5 100644 --- a/docs/ai/evaluation/snippets/evaluate-with-reporting/TestAIWithReporting.csproj +++ b/docs/ai/evaluation/snippets/evaluate-with-reporting/TestAIWithReporting.csproj @@ -11,15 +11,15 @@ - - - - - - - + + + + + + + - + diff --git a/docs/ai/how-to/snippets/access-data/Project.csproj b/docs/ai/how-to/snippets/access-data/Project.csproj index 28758e9b6a451..4888ffec5c78f 100644 --- a/docs/ai/how-to/snippets/access-data/Project.csproj +++ b/docs/ai/how-to/snippets/access-data/Project.csproj @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/docs/ai/how-to/snippets/hosted-app-auth/hosted-app-auth.csproj b/docs/ai/how-to/snippets/hosted-app-auth/hosted-app-auth.csproj index e2b58354ef241..f4d3ee4baaef7 100644 --- a/docs/ai/how-to/snippets/hosted-app-auth/hosted-app-auth.csproj +++ b/docs/ai/how-to/snippets/hosted-app-auth/hosted-app-auth.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/docs/ai/ichatclient.md b/docs/ai/ichatclient.md index 55d90eafd4ec5..164f57d774ad7 100644 --- a/docs/ai/ichatclient.md +++ b/docs/ai/ichatclient.md @@ -172,3 +172,10 @@ For more realistic, concrete implementations of `IChatClient`, see: > This feature is experimental and subject to change. Chat reduction helps manage conversation history by limiting the number of messages or summarizing older messages when the conversation exceeds a specified length. The `Microsoft.Extensions.AI` library provides reducers like that limits the number of non-system messages, and that automatically summarizes older messages while preserving context. + +## Chat routing (experimental) + +> [!IMPORTANT] +> This feature is experimental and subject to change. + +Chat routing helps direct each request to one of several chat clients—for example, based on the content of the request, or by failing over to another client when one is unavailable. The `Microsoft.Extensions.AI` library provides , an abstract `IChatClient` that selects and invokes another client for each request, and , an abstract subclass that retries with another client when an attempt fails before producing output. Samples include , which fails over across an ordered sequence of clients, and , which selects a client based on the semantic similarity of the request to example utterances. diff --git a/docs/ai/quickstarts/snippets/image-generation/openai/ImagesOpenAI.csproj b/docs/ai/quickstarts/snippets/image-generation/openai/ImagesOpenAI.csproj index 5f7c914e6bacd..489bae1cc24b3 100644 --- a/docs/ai/quickstarts/snippets/image-generation/openai/ImagesOpenAI.csproj +++ b/docs/ai/quickstarts/snippets/image-generation/openai/ImagesOpenAI.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/docs/ai/quickstarts/snippets/mcp-client/MinimalMCPClient.csproj b/docs/ai/quickstarts/snippets/mcp-client/MinimalMCPClient.csproj index 47d20b9dc7863..6f1cb4a432edf 100644 --- a/docs/ai/quickstarts/snippets/mcp-client/MinimalMCPClient.csproj +++ b/docs/ai/quickstarts/snippets/mcp-client/MinimalMCPClient.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/docs/ai/quickstarts/snippets/process-data/ProcessData.csproj b/docs/ai/quickstarts/snippets/process-data/ProcessData.csproj index 1d74590eb9592..3d7b1ffa74c95 100644 --- a/docs/ai/quickstarts/snippets/process-data/ProcessData.csproj +++ b/docs/ai/quickstarts/snippets/process-data/ProcessData.csproj @@ -10,12 +10,12 @@ - - - + + + - + diff --git a/docs/ai/snippets/microsoft-extensions-ai/AI.Shared/AI.Shared.csproj b/docs/ai/snippets/microsoft-extensions-ai/AI.Shared/AI.Shared.csproj index a6027ffadd024..89e763a7bd0ee 100644 --- a/docs/ai/snippets/microsoft-extensions-ai/AI.Shared/AI.Shared.csproj +++ b/docs/ai/snippets/microsoft-extensions-ai/AI.Shared/AI.Shared.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj index 9a18a16aaf7eb..a0bf18e75cd69 100644 --- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj +++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.ConsumeClientMiddleware/ConsoleAI.ConsumeClientMiddleware.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj index 0cc134ed3f9be..231af5a0b97ed 100644 --- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj +++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.DependencyInjection/ConsoleAI.DependencyInjection.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/ConsoleAI.StatelessStateful.csproj b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/ConsoleAI.StatelessStateful.csproj index 0700c8d7913ef..0c30971f08cac 100644 --- a/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/ConsoleAI.StatelessStateful.csproj +++ b/docs/ai/snippets/microsoft-extensions-ai/ConsoleAI.StatelessStateful/ConsoleAI.StatelessStateful.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj index 3d480fb6d44e8..64c3aae41dcc4 100644 --- a/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj +++ b/docs/ai/vector-stores/snippets/chat-with-data/azure-openai/VectorDataAI.csproj @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj index 7b8839e3d5cd7..507f3cfe607f1 100644 --- a/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj +++ b/docs/ai/vector-stores/snippets/conceptual/VectorStoreSnippets.csproj @@ -9,10 +9,10 @@ - - + + - + diff --git a/docs/architecture/blazor-for-web-forms-developers/migration.md b/docs/architecture/blazor-for-web-forms-developers/migration.md index af6a6540589c7..626a15ed54249 100644 --- a/docs/architecture/blazor-for-web-forms-developers/migration.md +++ b/docs/architecture/blazor-for-web-forms-developers/migration.md @@ -624,7 +624,7 @@ Because Blazor is built on .NET Core, there are considerations in ensuring suppo - Code Access Security (CAS) - Security Transparency -For more information on techniques to identify necessary changes to support running on .NET Core, see [Port your code from .NET Framework to .NET Core](../../core/porting/index.md). +For more information on techniques to identify necessary changes to support running on .NET Core, see [Port your code from .NET Framework to .NET](../../core/porting/framework-overview.md). ASP.NET Core is a reimagined version of ASP.NET and has some changes that may not initially seem obvious. The main changes are: diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 2a99923d63267..9a8e3aa568907 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -132,7 +132,7 @@ | WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.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.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) | | Web PubSub | NuGet [1.6.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.6.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.6.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) | | Web PubSub Client | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub.Client-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | -| Azure client library integration for ASP.NET Core | NuGet [1.14.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.14.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.14.0/sdk/extensions/Microsoft.Extensions.Azure/) | +| Azure client library integration for ASP.NET Core | NuGet [1.14.1](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.14.1) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.14.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.14.1/sdk/extensions/Microsoft.Extensions.Azure/) | | Blob Storage Key Store for .NET Data Protection | NuGet [1.5.3](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.5.3) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.5.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.5.3/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | | CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) | | Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) | @@ -144,7 +144,7 @@ | WebJobs Extensions - Event Grid | NuGet [3.5.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventGrid/3.5.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventGrid-readme) | GitHub [3.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventGrid_3.5.0/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/) | | WebJobs Extensions - Event Hubs | NuGet [6.5.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs/6.5.3) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventHubs-readme) | GitHub [6.5.3](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventHubs_6.5.3/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/) | | WebJobs Extensions - Service Bus | NuGet [5.17.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.17.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.ServiceBus-readme) | GitHub [5.17.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.17.0/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/) | -| WebJobs Extensions - SignalR Service | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/2.1.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [2.1.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | +| WebJobs Extensions - SignalR Service | NuGet [2.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/2.2.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [2.2.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | | WebJobs Extensions - Storage | NuGet [5.3.8](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage/5.3.8) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage-readme) | GitHub [5.3.8](https://github.com/Azure/azure-webjobs-sdk/tree/master/src/Microsoft.Azure.WebJobs.Extensions.Storage) | | WebJobs Extensions - Web PubSub | NuGet [1.10.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSub/1.10.2) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.WebPubSub-readme) | GitHub [1.10.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.WebPubSub_1.10.2/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSub/) | | Functions extension for Blob Storage | NuGet [5.3.8](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/5.3.8) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs-readme) | GitHub [5.3.8](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs_5.3.8/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/) | @@ -168,6 +168,7 @@ | Provisioning - Cosmos DB | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Provisioning.CosmosDB/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.CosmosDB/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.CosmosDB-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.CosmosDB_1.0.0/sdk/provisioning/Azure.Provisioning.CosmosDB/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.CosmosDB_1.1.0-beta.1/sdk/provisioning/Azure.Provisioning.CosmosDB/) | | Provisioning - Cost Management | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.CostManagement/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.CostManagement-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.CostManagement_1.0.0-beta.1/sdk/costmanagement/Azure.Provisioning.CostManagement/) | | Provisioning - Deployment | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Provisioning.Deployment/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Provisioning.Deployment-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Deployment_1.0.0-beta.2/sdk/provisioning/Azure.Provisioning.Deployment/) | +| Provisioning - Desktopvirtualization | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.DesktopVirtualization/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.DesktopVirtualization-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.DesktopVirtualization_1.0.0-beta.1/sdk/desktopvirtualization/Azure.Provisioning.DesktopVirtualization/) | | Provisioning - Dns | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Provisioning.Dns/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Provisioning.Dns-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Dns_1.0.0-beta.2/sdk/provisioning/Azure.Provisioning.Dns/) | | Provisioning - Domainregistration | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.DomainRegistration/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.DomainRegistration-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.DomainRegistration_1.0.0-beta.1/sdk/domainregistration/Azure.Provisioning.DomainRegistration/) | | Provisioning - Durable Task | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.DurableTask/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.DurableTask-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.DurableTask_1.0.0-beta.1/sdk/durabletask/Azure.Provisioning.DurableTask/) | @@ -179,6 +180,7 @@ | Provisioning - Kubernetes | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Provisioning.Kubernetes/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Provisioning.Kubernetes-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Kubernetes_1.0.0-beta.4/sdk/hybridkubernetes/Azure.Provisioning.Kubernetes/) | | Provisioning - Kubernetes Configuration | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Provisioning.KubernetesConfiguration/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Provisioning.KubernetesConfiguration-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.KubernetesConfiguration_1.0.0-beta.3/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/) | | Provisioning - Kusto | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Provisioning.Kusto/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Provisioning.Kusto-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Kusto_1.0.0-beta.2/sdk/provisioning/Azure.Provisioning.Kusto/) | +| Provisioning - Loadtesting | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.LoadTesting/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.LoadTesting-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.LoadTesting_1.0.0-beta.1/sdk/loadtestservice/Azure.Provisioning.LoadTesting/) | | Provisioning - Logic | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.Logic/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.Logic-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Logic_1.0.0-beta.1/sdk/logic/Azure.Provisioning.Logic/) | | Provisioning - Monitor | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.Monitor/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.Monitor-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Monitor_1.0.0-beta.1/sdk/monitor/Azure.Provisioning.Monitor/) | | Provisioning - Mysql | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.MySql/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.MySql-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.MySql_1.0.0-beta.1/sdk/mysql/Azure.Provisioning.MySql/) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index b59f948e38041..00f30cb0e2abd 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -146,7 +146,7 @@ | WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.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.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) | | Web PubSub | NuGet [1.6.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.6.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.6.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) | | Web PubSub Client | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub.Client-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | -| Azure client library integration for ASP.NET Core | NuGet [1.14.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.14.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.14.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.14.0/sdk/extensions/Microsoft.Extensions.Azure/) | +| Azure client library integration for ASP.NET Core | NuGet [1.14.1](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.14.1) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.14.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.14.1/sdk/extensions/Microsoft.Extensions.Azure/) | | Blob Storage Key Store for .NET Data Protection | NuGet [1.5.3](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.5.3) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.5.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.5.3/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | | CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) | | Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) | @@ -158,7 +158,7 @@ | WebJobs Extensions - Event Grid | NuGet [3.5.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventGrid/3.5.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventGrid-readme) | GitHub [3.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventGrid_3.5.0/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/) | | WebJobs Extensions - Event Hubs | NuGet [6.5.3](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs/6.5.3) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.EventHubs-readme) | GitHub [6.5.3](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.EventHubs_6.5.3/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/) | | WebJobs Extensions - Service Bus | NuGet [5.17.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.17.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.ServiceBus-readme) | GitHub [5.17.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.ServiceBus_5.17.0/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/) | -| WebJobs Extensions - SignalR Service | NuGet [2.1.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/2.1.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [2.1.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | +| WebJobs Extensions - SignalR Service | NuGet [2.2.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.SignalRService/2.2.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.SignalRService-readme) | GitHub [2.2.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/SignalRServiceExtension) | | WebJobs Extensions - Storage | NuGet [5.3.8](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage/5.3.8) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage-readme) | GitHub [5.3.8](https://github.com/Azure/azure-webjobs-sdk/tree/master/src/Microsoft.Azure.WebJobs.Extensions.Storage) | | WebJobs Extensions - Web PubSub | NuGet [1.10.2](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.WebPubSub/1.10.2) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.WebPubSub-readme) | GitHub [1.10.2](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.WebPubSub_1.10.2/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSub/) | | Functions extension for Blob Storage | NuGet [5.3.8](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/5.3.8) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs-readme) | GitHub [5.3.8](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs_5.3.8/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/) | @@ -182,6 +182,7 @@ | Provisioning - Cosmos DB | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Provisioning.CosmosDB/1.0.0)
NuGet [1.1.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.CosmosDB/1.1.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.CosmosDB-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.CosmosDB_1.0.0/sdk/provisioning/Azure.Provisioning.CosmosDB/)
GitHub [1.1.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.CosmosDB_1.1.0-beta.1/sdk/provisioning/Azure.Provisioning.CosmosDB/) | | Provisioning - Cost Management | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.CostManagement/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.CostManagement-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.CostManagement_1.0.0-beta.1/sdk/costmanagement/Azure.Provisioning.CostManagement/) | | Provisioning - Deployment | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Provisioning.Deployment/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Provisioning.Deployment-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Deployment_1.0.0-beta.2/sdk/provisioning/Azure.Provisioning.Deployment/) | +| Provisioning - Desktopvirtualization | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.DesktopVirtualization/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.DesktopVirtualization-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.DesktopVirtualization_1.0.0-beta.1/sdk/desktopvirtualization/Azure.Provisioning.DesktopVirtualization/) | | Provisioning - Dns | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Provisioning.Dns/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Provisioning.Dns-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Dns_1.0.0-beta.2/sdk/provisioning/Azure.Provisioning.Dns/) | | Provisioning - Domainregistration | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.DomainRegistration/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.DomainRegistration-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.DomainRegistration_1.0.0-beta.1/sdk/domainregistration/Azure.Provisioning.DomainRegistration/) | | Provisioning - Durable Task | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.DurableTask/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.DurableTask-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.DurableTask_1.0.0-beta.1/sdk/durabletask/Azure.Provisioning.DurableTask/) | @@ -193,6 +194,7 @@ | Provisioning - Kubernetes | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Provisioning.Kubernetes/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Provisioning.Kubernetes-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Kubernetes_1.0.0-beta.4/sdk/hybridkubernetes/Azure.Provisioning.Kubernetes/) | | Provisioning - Kubernetes Configuration | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Provisioning.KubernetesConfiguration/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Provisioning.KubernetesConfiguration-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.KubernetesConfiguration_1.0.0-beta.3/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/) | | Provisioning - Kusto | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.Provisioning.Kusto/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/Provisioning.Kusto-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Kusto_1.0.0-beta.2/sdk/provisioning/Azure.Provisioning.Kusto/) | +| Provisioning - Loadtesting | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.LoadTesting/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.LoadTesting-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.LoadTesting_1.0.0-beta.1/sdk/loadtestservice/Azure.Provisioning.LoadTesting/) | | Provisioning - Logic | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.Logic/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.Logic-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Logic_1.0.0-beta.1/sdk/logic/Azure.Provisioning.Logic/) | | Provisioning - Monitor | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.Monitor/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.Monitor-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.Monitor_1.0.0-beta.1/sdk/monitor/Azure.Provisioning.Monitor/) | | Provisioning - Mysql | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Provisioning.MySql/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Provisioning.MySql-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Provisioning.MySql_1.0.0-beta.1/sdk/mysql/Azure.Provisioning.MySql/) | diff --git a/docs/azure/sdk/snippets/unit-testing/UnitTestingSampleApp.csproj b/docs/azure/sdk/snippets/unit-testing/UnitTestingSampleApp.csproj index 9a9cfdae862d8..3c12a650c0a81 100644 --- a/docs/azure/sdk/snippets/unit-testing/UnitTestingSampleApp.csproj +++ b/docs/azure/sdk/snippets/unit-testing/UnitTestingSampleApp.csproj @@ -14,7 +14,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/docs/core/compatibility/breaking-changes.md b/docs/core/compatibility/breaking-changes.md index 0a0c66d443aa5..5400efe9b5476 100644 --- a/docs/core/compatibility/breaking-changes.md +++ b/docs/core/compatibility/breaking-changes.md @@ -22,5 +22,5 @@ You can also view individual issues that detail the breaking changes introduced - [API removal in .NET](api-removal.md) - [.NET runtime compatibility](../versions/index.md#net-runtime-compatibility) -- [Migrate from .NET Framework to .NET Core](../porting/index.md) +- [Migrate from .NET Framework to .NET Core](../porting/framework-overview.md) - [Breaking changes for migration from .NET Framework to .NET Core](fx-core.md) diff --git a/docs/core/compatibility/jit/11/minimum-hardware-requirements.md b/docs/core/compatibility/jit/11/minimum-hardware-requirements.md index a487f6f557102..1e7fa98b44c36 100644 --- a/docs/core/compatibility/jit/11/minimum-hardware-requirements.md +++ b/docs/core/compatibility/jit/11/minimum-hardware-requirements.md @@ -1,14 +1,14 @@ --- title: "Breaking change: Minimum hardware requirements updated" -description: "Learn about the breaking change in .NET 11 where minimum hardware requirements have been updated for x86/x64 and Arm64 architectures." -ms.date: 01/09/2026 +description: "Learn about the breaking change in .NET 11 where x86/x64 minimum hardware requirements and x86/x64 and Arm64 ReadyToRun targets have been updated." +ms.date: 08/15/2026 ai-usage: ai-assisted ms.custom: https://github.com/dotnet/docs/issues/48045 --- # Minimum hardware requirements updated -The minimum hardware requirements for .NET 11 have been updated to require more modern instruction sets on both x86/x64 and Arm64 architectures. Additionally, the ReadyToRun (R2R) compilation targets have been updated to take advantage of newer hardware capabilities. +The minimum hardware requirements for .NET 11 have been updated to require more modern instruction sets on x86/x64 architectures. Additionally, the ReadyToRun (R2R) compilation targets for x86/x64 and Arm64 have been updated to take advantage of newer hardware capabilities. ### Arm64 @@ -16,13 +16,13 @@ For Apple, there's no change to the minimum hardware or the `ReadyToRun` target. For Linux, there's no change to the minimum hardware. .NET continues to support devices such as Raspberry Pi that might only provide support for the `AdvSimd` instruction set. The `ReadyToRun` target has been updated to include the `LSE` instruction set, which might result in additional jitting overhead if you launch an application. -For Windows, the baseline is updated to require the `LSE` instruction set. This is [required by Windows 11](/windows-hardware/design/minimum/minimum-hardware-requirements-overview) and by [all Arm64 CPUs officially supported by Windows 10](/windows-hardware/design/minimum/windows-processor-requirements). Additionally, it's inline with the `Arm SBSA` (Server Base System Architecture) requirements. The `ReadyToRun` target has been updated to be `armv8.2-a + RCPC` (this provides support for at least `AdvSimd`, `CRC`, `LSE`, `RCPC`, and `RDMA`), which covers the majority of hardware officially supported. +For Windows, there's no change to the minimum hardware. .NET continues to support `armv8.0-a` devices, including Windows 10 IoT devices that don't provide the `LSE` instruction set. The `ReadyToRun` target has been updated to be `armv8.2-a + RCPC` (this provides support for at least `AdvSimd`, `CRC`, `LSE`, `RCPC`, and `RDMA`), which covers the majority of hardware officially supported. Devices that don't meet this target can still run .NET, but affected `ReadyToRun` images fall back to JIT compilation. | OS | Previous JIT/AOT minimum | New JIT/AOT minimum | Previous R2R target | New R2R target | |---------|--------------------------|---------------------|---------------------|------------------| | Apple | Apple M1 | (No change) | Apple M1 | (No change) | | Linux | armv8.0-a | (No change) | armv8.0-a | armv8.0-a + LSE | -| Windows | armv8.0-a | armv8.0-a + LSE | armv8.0-a | armv8.2-a + RCPC | +| Windows | armv8.0-a | (No change) | armv8.0-a | armv8.2-a + RCPC | ### x86/x64 @@ -46,7 +46,7 @@ By default, .NET successfully launched and ran on older hardware. Individual app ## New behavior -Starting with .NET 11, .NET fails to run on older hardware and might print a message similar to the following. (In some scenarios, a more descriptive message might be provided that lists the concrete hardware requirements for a given operating system and architecture.) +Starting with .NET 11, .NET fails to run on x86/x64 hardware that doesn't support the `x86-64-v2` instruction set and might print a message similar to the following. (In some scenarios, a more descriptive message might be provided that lists the concrete hardware requirements for a given operating system and architecture.) > The current CPU is missing one or more of the baseline instruction sets. @@ -60,11 +60,13 @@ This change is a [behavioral change](../../categories.md#behavioral-change). .NET supports a broad range of hardware, often above and beyond the minimum hardware requirements put in place by the underlying operating system (OS). .NET also has built-in support for taking advantage of the hardware it's actively running on for JIT scenarios. However, this support adds significant complexity to the codebase, particularly for much older hardware that's unlikely to still be in use. Additionally, it defines a "lowest common denominator" that AOT targets must default to which can, in some domain-specific scenarios, lead to reduced performance for applications. -The update to the minimum baseline was made to reduce the maintenance complexity of the codebase and to better align with the documented (and often enforced) hardware requirements of the underlying OS. +The update to the x86/x64 minimum baseline was made to reduce the maintenance complexity of the codebase and to better align with the documented (and often enforced) hardware requirements of the underlying OS. The Arm64 minimum baseline remains unchanged so that .NET continues to support hardware that's supported by Windows 10 IoT. ## Recommended action -If you're using hardware that's no longer supported, consider updating. Such hardware is officially out of support and might not boot on operating system versions that are supported by .NET. +If you're using x86/x64 hardware that's no longer supported, consider updating. Such hardware is officially out of support and might not boot on operating system versions that are supported by .NET. + +No action is required for supported Arm64 hardware that doesn't meet the new `ReadyToRun` target, but applications might have additional startup overhead when affected `ReadyToRun` images fall back to JIT compilation. ## Affected APIs diff --git a/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata/buildmetadata.csproj b/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata/buildmetadata.csproj index 021a6b849f1ad..21fb1f39b24d1 100644 --- a/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata/buildmetadata.csproj +++ b/docs/core/diagnostics/ambient-metadata/snippets/buildmetadata/buildmetadata.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/core/diagnostics/snippets/Metrics/metric-instr.csproj b/docs/core/diagnostics/snippets/Metrics/metric-instr.csproj index 66df7dcf52103..73daf08274a78 100644 --- a/docs/core/diagnostics/snippets/Metrics/metric-instr.csproj +++ b/docs/core/diagnostics/snippets/Metrics/metric-instr.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/diagnostics/snippets/MetricsGen/MetricsGen.csproj b/docs/core/diagnostics/snippets/MetricsGen/MetricsGen.csproj index d8b53abf14c44..7582af90abb01 100644 --- a/docs/core/diagnostics/snippets/MetricsGen/MetricsGen.csproj +++ b/docs/core/diagnostics/snippets/MetricsGen/MetricsGen.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/core/diagnostics/snippets/exception-summary/exception-summary.csproj b/docs/core/diagnostics/snippets/exception-summary/exception-summary.csproj index c00a631e07d4e..3fe9c71841769 100644 --- a/docs/core/diagnostics/snippets/exception-summary/exception-summary.csproj +++ b/docs/core/diagnostics/snippets/exception-summary/exception-summary.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/core/diagnostics/snippets/health-checks/health-checks.csproj b/docs/core/diagnostics/snippets/health-checks/health-checks.csproj index 01d6e2763dca8..a4d4cc3701b7b 100644 --- a/docs/core/diagnostics/snippets/health-checks/health-checks.csproj +++ b/docs/core/diagnostics/snippets/health-checks/health-checks.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/core/diagnostics/snippets/lifetime-health-checks/lifetime-health-checks.csproj b/docs/core/diagnostics/snippets/lifetime-health-checks/lifetime-health-checks.csproj index 326477cf25ee4..d7347ab2768db 100644 --- a/docs/core/diagnostics/snippets/lifetime-health-checks/lifetime-health-checks.csproj +++ b/docs/core/diagnostics/snippets/lifetime-health-checks/lifetime-health-checks.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/core/diagnostics/snippets/resource-monitoring-with-manual-metrics/resource-monitoring-with-manual-metrics.csproj b/docs/core/diagnostics/snippets/resource-monitoring-with-manual-metrics/resource-monitoring-with-manual-metrics.csproj index af8b2e19e4615..71f09d0263858 100644 --- a/docs/core/diagnostics/snippets/resource-monitoring-with-manual-metrics/resource-monitoring-with-manual-metrics.csproj +++ b/docs/core/diagnostics/snippets/resource-monitoring-with-manual-metrics/resource-monitoring-with-manual-metrics.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/docs/core/enrichment/snippets/applicationlogenricher/applogenricher.csproj b/docs/core/enrichment/snippets/applicationlogenricher/applogenricher.csproj index 6d6e0915c71d5..fc27cdc3744da 100644 --- a/docs/core/enrichment/snippets/applicationlogenricher/applogenricher.csproj +++ b/docs/core/enrichment/snippets/applicationlogenricher/applogenricher.csproj @@ -8,11 +8,11 @@ - - - - - + + + + + diff --git a/docs/core/enrichment/snippets/httpclientlogenricher/httpclientlogenricher.csproj b/docs/core/enrichment/snippets/httpclientlogenricher/httpclientlogenricher.csproj index 8c4609269d6f1..1b5df899bb8c6 100644 --- a/docs/core/enrichment/snippets/httpclientlogenricher/httpclientlogenricher.csproj +++ b/docs/core/enrichment/snippets/httpclientlogenricher/httpclientlogenricher.csproj @@ -9,10 +9,10 @@ - - - - + + + + diff --git a/docs/core/extensions/logging/snippets/source-generation/csharp/csharp.csproj b/docs/core/extensions/logging/snippets/source-generation/csharp/csharp.csproj index 304a19fa28b68..7af659aa16bc7 100644 --- a/docs/core/extensions/logging/snippets/source-generation/csharp/csharp.csproj +++ b/docs/core/extensions/logging/snippets/source-generation/csharp/csharp.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/docs/core/extensions/snippets/async-state/csharp/IAsyncContextExample/IAsyncContextExample.csproj b/docs/core/extensions/snippets/async-state/csharp/IAsyncContextExample/IAsyncContextExample.csproj index 61fea351e24be..649def08f9cb6 100644 --- a/docs/core/extensions/snippets/async-state/csharp/IAsyncContextExample/IAsyncContextExample.csproj +++ b/docs/core/extensions/snippets/async-state/csharp/IAsyncContextExample/IAsyncContextExample.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/docs/core/extensions/snippets/async-state/csharp/RequestCorrelation/RequestCorrelation.csproj b/docs/core/extensions/snippets/async-state/csharp/RequestCorrelation/RequestCorrelation.csproj index 1ec7072f6099c..cea4cd489a132 100644 --- a/docs/core/extensions/snippets/async-state/csharp/RequestCorrelation/RequestCorrelation.csproj +++ b/docs/core/extensions/snippets/async-state/csharp/RequestCorrelation/RequestCorrelation.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj b/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj index b57a08cd86768..427a80010adef 100644 --- a/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj +++ b/docs/core/extensions/snippets/caching/distributed/distributed-apis.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/caching/hybrid-cache/csharp/HybridCacheExample.csproj b/docs/core/extensions/snippets/caching/hybrid-cache/csharp/HybridCacheExample.csproj index 99a0a133d5c99..4f6275c9933a3 100644 --- a/docs/core/extensions/snippets/caching/hybrid-cache/csharp/HybridCacheExample.csproj +++ b/docs/core/extensions/snippets/caching/hybrid-cache/csharp/HybridCacheExample.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj b/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj index 1ba1abd4612ee..c8110b4e2b5ec 100644 --- a/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj +++ b/docs/core/extensions/snippets/caching/memory-apis/memory-apis.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj b/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj index da9a75d1e0a0b..1b9bb472d5b3d 100644 --- a/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj +++ b/docs/core/extensions/snippets/caching/memory-worker/memory-worker.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj b/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj index 9001a7ff3445a..b623a717c172a 100644 --- a/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj +++ b/docs/core/extensions/snippets/configuration/app-lifetime/app-lifetime.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj b/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj index 1ea1c67fcacc5..1c0aa89dfd0b2 100644 --- a/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj +++ b/docs/core/extensions/snippets/configuration/console-basic/console-basic.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/console-binder-gen/console-binder-gen.csproj b/docs/core/extensions/snippets/configuration/console-binder-gen/console-binder-gen.csproj index b8b41b0643922..c945db47e50fd 100644 --- a/docs/core/extensions/snippets/configuration/console-binder-gen/console-binder-gen.csproj +++ b/docs/core/extensions/snippets/configuration/console-binder-gen/console-binder-gen.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj b/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj index a96c1b2a738a7..9a636a7fc84ae 100644 --- a/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj +++ b/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console-env/console-env.csproj b/docs/core/extensions/snippets/configuration/console-env/console-env.csproj index 57b09a5e26e20..dd17531add330 100644 --- a/docs/core/extensions/snippets/configuration/console-env/console-env.csproj +++ b/docs/core/extensions/snippets/configuration/console-env/console-env.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/console-host/console-host.csproj b/docs/core/extensions/snippets/configuration/console-host/console-host.csproj index 77edb1c760afe..73394e66741d8 100644 --- a/docs/core/extensions/snippets/configuration/console-host/console-host.csproj +++ b/docs/core/extensions/snippets/configuration/console-host/console-host.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj b/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj index 1ea1c67fcacc5..1c0aa89dfd0b2 100644 --- a/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj +++ b/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj @@ -14,8 +14,8 @@
- - + + diff --git a/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj b/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj index 9fef9a89d4740..3edd99793da7d 100644 --- a/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj +++ b/docs/core/extensions/snippets/configuration/console-ini/console-ini.csproj @@ -19,9 +19,9 @@
- - - + + + diff --git a/docs/core/extensions/snippets/configuration/console-json/console-json.csproj b/docs/core/extensions/snippets/configuration/console-json/console-json.csproj index c2d1b89293077..7d661f8581170 100644 --- a/docs/core/extensions/snippets/configuration/console-json/console-json.csproj +++ b/docs/core/extensions/snippets/configuration/console-json/console-json.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj b/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj index cefdf07dc9da0..c36d60106129a 100644 --- a/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj +++ b/docs/core/extensions/snippets/configuration/console-memory/console-memory.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj b/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj index 4d696aa88c384..7619d0895a6dd 100644 --- a/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj +++ b/docs/core/extensions/snippets/configuration/console-raw/console-raw.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console-validation-gen/console-validation-gen.csproj b/docs/core/extensions/snippets/configuration/console-validation-gen/console-validation-gen.csproj index b315bec7c61b9..9f31659d9d806 100644 --- a/docs/core/extensions/snippets/configuration/console-validation-gen/console-validation-gen.csproj +++ b/docs/core/extensions/snippets/configuration/console-validation-gen/console-validation-gen.csproj @@ -19,10 +19,10 @@ - - - - + + + + diff --git a/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj b/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj index 4834ba87d177f..64d8f0781be99 100644 --- a/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj +++ b/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj @@ -23,9 +23,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console/console.csproj b/docs/core/extensions/snippets/configuration/console/console.csproj index 5a71263c5a35a..1cd6b1cbae3e7 100644 --- a/docs/core/extensions/snippets/configuration/console/console.csproj +++ b/docs/core/extensions/snippets/configuration/console/console.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj b/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj index 0d3d0196c0072..a4cb1bc73970c 100644 --- a/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj +++ b/docs/core/extensions/snippets/configuration/custom-provider/custom-provider.csproj @@ -9,11 +9,11 @@ - - - - - + + + + + diff --git a/docs/core/extensions/snippets/configuration/options-action/options-action.csproj b/docs/core/extensions/snippets/configuration/options-action/options-action.csproj index d5e696233665f..74f77f463a550 100644 --- a/docs/core/extensions/snippets/configuration/options-action/options-action.csproj +++ b/docs/core/extensions/snippets/configuration/options-action/options-action.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj b/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj index 14f897709aa39..089bccc18e853 100644 --- a/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj +++ b/docs/core/extensions/snippets/configuration/options-configparam/options-configparam.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj b/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj index 11e8848d1a623..17f939c49fd60 100644 --- a/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj +++ b/docs/core/extensions/snippets/configuration/options-noparams/options-noparams.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-object/options-object.csproj b/docs/core/extensions/snippets/configuration/options-object/options-object.csproj index 2bf5062b847ef..c65b49095a860 100644 --- a/docs/core/extensions/snippets/configuration/options-object/options-object.csproj +++ b/docs/core/extensions/snippets/configuration/options-object/options-object.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj b/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj index ea2ca6d3d760c..3ba0805951fde 100644 --- a/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj +++ b/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-recursive-validation/options-recursive-validation.csproj b/docs/core/extensions/snippets/configuration/options-recursive-validation/options-recursive-validation.csproj index c85243a8240c3..320a3196c3215 100644 --- a/docs/core/extensions/snippets/configuration/options-recursive-validation/options-recursive-validation.csproj +++ b/docs/core/extensions/snippets/configuration/options-recursive-validation/options-recursive-validation.csproj @@ -19,11 +19,11 @@ - - - - - + + + + + diff --git a/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj b/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj index 83680ad16e6c9..4830fe15b5a2d 100644 --- a/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj +++ b/docs/core/extensions/snippets/configuration/options-validation-onstart/options-validation-onstart.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj b/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj index 712333d4c8b4a..a7d512192ed3f 100644 --- a/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj +++ b/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj @@ -8,7 +8,7 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj b/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj index 022f177539b88..75b049271b708 100644 --- a/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj +++ b/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj @@ -9,7 +9,7 @@ - - + + diff --git a/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/CompleteExample/CompleteExample.csproj b/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/CompleteExample/CompleteExample.csproj index 716bb07130c8b..f358909866408 100644 --- a/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/CompleteExample/CompleteExample.csproj +++ b/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/CompleteExample/CompleteExample.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/DependenciesExample/DependenciesExample.csproj b/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/DependenciesExample/DependenciesExample.csproj index cfc422e274ddc..bd63abe14864e 100644 --- a/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/DependenciesExample/DependenciesExample.csproj +++ b/docs/core/extensions/snippets/dependency-injection-auto-activation/csharp/DependenciesExample/DependenciesExample.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/fileglobbing/example/example.csproj b/docs/core/extensions/snippets/fileglobbing/example/example.csproj index 7d53301ff9632..48a9290eac3a1 100644 --- a/docs/core/extensions/snippets/fileglobbing/example/example.csproj +++ b/docs/core/extensions/snippets/fileglobbing/example/example.csproj @@ -59,8 +59,8 @@ - - + + diff --git a/docs/core/extensions/snippets/http/basic/basic.csproj b/docs/core/extensions/snippets/http/basic/basic.csproj index f9e9622f631ef..2e0a92c8ad85e 100644 --- a/docs/core/extensions/snippets/http/basic/basic.csproj +++ b/docs/core/extensions/snippets/http/basic/basic.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj b/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj index 6d80b27f18423..3723001dfefb5 100644 --- a/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj +++ b/docs/core/extensions/snippets/http/configurehandler/configurehandler.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/http/generated/generated.csproj b/docs/core/extensions/snippets/http/generated/generated.csproj index bb4df9549ec78..23f0b87a82cee 100644 --- a/docs/core/extensions/snippets/http/generated/generated.csproj +++ b/docs/core/extensions/snippets/http/generated/generated.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/http/named/named.csproj b/docs/core/extensions/snippets/http/named/named.csproj index b0af11be0cc3e..4a03e5b390d7e 100644 --- a/docs/core/extensions/snippets/http/named/named.csproj +++ b/docs/core/extensions/snippets/http/named/named.csproj @@ -19,8 +19,8 @@ - - + + diff --git a/docs/core/extensions/snippets/http/typed/typed.csproj b/docs/core/extensions/snippets/http/typed/typed.csproj index c9f0fc2e9a50b..d1f928c9c66e7 100644 --- a/docs/core/extensions/snippets/http/typed/typed.csproj +++ b/docs/core/extensions/snippets/http/typed/typed.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/localization/example/example.csproj b/docs/core/extensions/snippets/localization/example/example.csproj index ae383d541528e..f8530721a74c4 100644 --- a/docs/core/extensions/snippets/localization/example/example.csproj +++ b/docs/core/extensions/snippets/localization/example/example.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/logging/di-without-host/di-without-host.csproj b/docs/core/extensions/snippets/logging/di-without-host/di-without-host.csproj index 5643320ed19f1..78494e491ee0e 100644 --- a/docs/core/extensions/snippets/logging/di-without-host/di-without-host.csproj +++ b/docs/core/extensions/snippets/logging/di-without-host/di-without-host.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/primitives/change/tokens.csproj b/docs/core/extensions/snippets/primitives/change/tokens.csproj index ad24cf8309d9b..d74e35cb02f97 100644 --- a/docs/core/extensions/snippets/primitives/change/tokens.csproj +++ b/docs/core/extensions/snippets/primitives/change/tokens.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/extensions/snippets/primitives/string/tokenizers.csproj b/docs/core/extensions/snippets/primitives/string/tokenizers.csproj index 4b5b13a940411..f29b367a46cdb 100644 --- a/docs/core/extensions/snippets/primitives/string/tokenizers.csproj +++ b/docs/core/extensions/snippets/primitives/string/tokenizers.csproj @@ -10,7 +10,7 @@ - + diff --git a/docs/core/porting/breaking-changes.md b/docs/core/porting/breaking-changes.md index d77d8c081dd67..e16d56bd1ea40 100644 --- a/docs/core/porting/breaking-changes.md +++ b/docs/core/porting/breaking-changes.md @@ -41,4 +41,4 @@ For more information, see [How code changes can affect compatibility](../compati ## Find breaking changes -Changes that affect compatibility are documented. Review these changes before you port your code from .NET Framework to .NET or upgrade it to a newer version of .NET. For a list of these breaking changes, see [Breaking changes for migration from .NET Framework to .NET Core](../compatibility/fx-core.md). +Changes that affect compatibility are documented. Review these changes before you port your code from .NET Framework to .NET or upgrade it to a newer version of .NET. For a list of these breaking changes, see [Breaking changes for migration from .NET Framework to .NET](../compatibility/fx-core.md). diff --git a/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj b/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj index 329152cd7b86b..de67a89c56f7e 100644 --- a/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj +++ b/docs/core/testing/snippets/order-unit-tests/csharp/MSTest.Project/MSTest.Project.csproj @@ -9,8 +9,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/docs/core/tools/dotnet-new-details.md b/docs/core/tools/dotnet-new-details.md index 20ab146846908..09de58f742642 100644 --- a/docs/core/tools/dotnet-new-details.md +++ b/docs/core/tools/dotnet-new-details.md @@ -1,5 +1,6 @@ --- title: dotnet new details +ai-usage: ai-assisted description: The dotnet new details command displays template package metadata. ms.date: 06/07/2023 --- @@ -33,8 +34,8 @@ If the package is installed locally or is found on the official NuGet website, i - **`--add-source|--nuget-source `** - By default, `dotnet new details` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet source the package can be installed from. If `--nuget-source` is specified, the source is added to the list of sources to be checked. - To check the configured sources for the current directory use [`dotnet nuget list source`](dotnet-nuget-list-source.md). For more information, see [Common NuGet Configurations](/nuget/consume-packages/configuring-nuget-behavior). + By default, `dotnet new details` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet sources for the operation. Specify `--nuget-source` to use a source in addition to the configured sources. + To check the configured sources for the current directory, use [`dotnet nuget list source`](dotnet-nuget-list-source.md). For more information, see [Common NuGet Configurations](/nuget/consume-packages/configuring-nuget-behavior). - [!INCLUDE [interactive](includes/cli-interactive.md)] diff --git a/docs/core/tools/dotnet-new-install.md b/docs/core/tools/dotnet-new-install.md index 54b88c34de7ed..ff11d744c9f02 100644 --- a/docs/core/tools/dotnet-new-install.md +++ b/docs/core/tools/dotnet-new-install.md @@ -1,5 +1,6 @@ --- title: dotnet new install +ai-usage: ai-assisted description: The dotnet new install command installs a template package. ms.date: 11/12/2025 --- @@ -56,8 +57,8 @@ Starting with .NET SDK 6.0.100, installed template packages are available in lat - **`--add-source|--nuget-source `** - By default, `dotnet new install` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet source the package can be installed from. If `--nuget-source` is specified, the source will be added to the list of sources to be checked. - To check the configured sources for the current directory use [`dotnet nuget list source`](dotnet-nuget-list-source.md). For more information, see [Common NuGet Configurations](/nuget/consume-packages/configuring-nuget-behavior). + By default, `dotnet new install` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet sources for the operation. Specify `--nuget-source` to use a source in addition to the configured sources. + To check the configured sources for the current directory, use [`dotnet nuget list source`](dotnet-nuget-list-source.md). For more information, see [Common NuGet Configurations](/nuget/consume-packages/configuring-nuget-behavior). > [!NOTE] > Following NuGet's [Https Everywhere](https://devblogs.microsoft.com/nuget/https-everywhere/) initiative, `dotnet new` is phasing out `http` feeds. If an `http` feed is passed, it isn't queried for packages and a warning is displayed. The `--force` option can be used to override this behavior if necessary. diff --git a/docs/core/tools/dotnet-new-update.md b/docs/core/tools/dotnet-new-update.md index 11e50dce2484d..bcb78953d6b60 100644 --- a/docs/core/tools/dotnet-new-update.md +++ b/docs/core/tools/dotnet-new-update.md @@ -1,5 +1,6 @@ --- title: dotnet new update +ai-usage: ai-assisted description: The dotnet new update command updates installed template packages. ms.date: 10/28/2025 --- @@ -14,10 +15,10 @@ ms.date: 10/28/2025 ## Synopsis ```dotnetcli -dotnet new update [--interactive] [--add-source|--nuget-source ] +dotnet new update [--interactive] [--add-source|--nuget-source ] [-d|--diagnostics] [--verbosity ] [-h|--help] -dotnet new update --check-only|--dry-run [--interactive] [--add-source|--nuget-source ] +dotnet new update --check-only|--dry-run [--interactive] [--add-source|--nuget-source ] [-d|--diagnostics] [--verbosity ] [-h|--help] ``` @@ -49,10 +50,10 @@ The `dotnet new update` command with `--check-only` option checks for available - [!INCLUDE [interactive](includes/cli-interactive.md)] -- **`--add-source|nuget-source `** - - By default, `dotnet new install` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet source the package can be installed from. If `--nuget-source` is specified, the source will be added to the list of sources to be checked. - To check the configured sources for the current directory use [`dotnet nuget list source`](dotnet-nuget-list-source.md). For more information, see [Common NuGet Configurations](/nuget/consume-packages/configuring-nuget-behavior). Available since .NET SDK 7.0.100. +- **`--add-source|--nuget-source `** + + By default, `dotnet new update` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet sources for the operation. Specify `--nuget-source` to use a source in addition to the configured sources. + To check the configured sources for the current directory, use [`dotnet nuget list source`](dotnet-nuget-list-source.md). For more information, see [Common NuGet Configurations](/nuget/consume-packages/configuring-nuget-behavior). Available since .NET SDK 7.0.100. - **`--check-only|--dry-run`** diff --git a/docs/core/tools/sdk-errors/netsdk1238.md b/docs/core/tools/sdk-errors/netsdk1238.md index 18fc84be849f5..dc07e6c540b70 100644 --- a/docs/core/tools/sdk-errors/netsdk1238.md +++ b/docs/core/tools/sdk-errors/netsdk1238.md @@ -15,6 +15,9 @@ This warning indicates that the .NET SDK used to build your project has one or m To resolve the warning, install a patched .NET SDK from and update your `global.json` (if present) to select the new version. +> [!NOTE] +> This check is available in .NET 11 Preview 5 and later versions. + ## How the check works The check is opt-in and only runs when the MSBuild property `CheckSdkVulnerabilities` is set to `true`: diff --git a/docs/core/tools/sdk-errors/netsdk1239.md b/docs/core/tools/sdk-errors/netsdk1239.md index 3b7e3cc15c9e6..d2eee11625f96 100644 --- a/docs/core/tools/sdk-errors/netsdk1239.md +++ b/docs/core/tools/sdk-errors/netsdk1239.md @@ -17,6 +17,9 @@ To resolve the warning, install a supported .NET SDK from [!NOTE] +> This check is available in .NET 11 Preview 5 and later versions. + ## How the check works The check is opt-in and only runs when the MSBuild property `CheckSdkVulnerabilities` is set to `true`: diff --git a/docs/core/tools/sdk-errors/netsdk1240.md b/docs/core/tools/sdk-errors/netsdk1240.md index 2f638297332d4..89c6154bdcd9f 100644 --- a/docs/core/tools/sdk-errors/netsdk1240.md +++ b/docs/core/tools/sdk-errors/netsdk1240.md @@ -15,6 +15,9 @@ This warning indicates that the feature band of the .NET SDK used to build your A .NET SDK version has the form `..` (for example, `8.0.404`, where `4xx` is the feature band). When the recommended servicing path moves to a different feature band, the older band stops receiving updates. To resolve the warning, install the recommended .NET SDK version from and update your `global.json` (if present) to select it. +> [!NOTE] +> This check is available in .NET 11 Preview 5 and later versions. + ## How the check works The check is opt-in and only runs when the MSBuild property `CheckSdkVulnerabilities` is set to `true`: diff --git a/docs/core/tools/telemetry.md b/docs/core/tools/telemetry.md index 468474b6c5dab..58e1ee7ad2395 100644 --- a/docs/core/tools/telemetry.md +++ b/docs/core/tools/telemetry.md @@ -2,7 +2,8 @@ title: .NET SDK and .NET CLI telemetry description: The .NET SDK and the .NET CLI collect usage information and send it to Microsoft. Learn what data is collected and how to opt out. author: KathleenDollard -ms.date: 10/07/2025 +ms.date: 08/11/2026 +ai-usage: ai-assisted --- # .NET SDK and .NET CLI telemetry @@ -58,6 +59,15 @@ For more information about your privacy and personal data collected, see the [Mi The following tabs show the telemetry data captured by SDK version: +# [.NET 11](#tab/dotnet11) + +- **SDK version 11.0.100 and later:** + - Roslyn compiler output cache telemetry: + - Whether the compiler found and restored a cached compilation result. + - The outcome of an attempt to store a compilation result in the cache. + - The compiler language (C# or Visual Basic). + - Time spent computing the cache key, restoring a cached result, storing a result, and compiling and emitting on a cache miss. + # [.NET 10](#tab/dotnet10) - **SDK version 10.0.100 and later:** diff --git a/docs/core/whats-new/dotnet-11/libraries.md b/docs/core/whats-new/dotnet-11/libraries.md index c5389a6d12e41..0c84cb9e77957 100644 --- a/docs/core/whats-new/dotnet-11/libraries.md +++ b/docs/core/whats-new/dotnet-11/libraries.md @@ -57,9 +57,9 @@ The full set of helpers includes: `System.Diagnostics.Process` adds finer control over starting and finding processes: -- `ProcessStartInfo.StartSuspended` starts a process in a suspended state on Windows and macOS. Pair it with `SafeProcessHandle.Resume` to let it run once you've finished any setup, such as attaching a debugger or configuring job objects. -- `Process.TryGetProcessById(System.Int32,System.Diagnostics.Process@)` returns `false` instead of throwing when no process with the given ID exists. -- `SafeProcessHandle.Open()` and `SafeProcessHandle.TryOpen()` open a handle to an existing process by ID. +- starts a process in a suspended state on Windows and macOS. Pair it with to let it run once you've finished any setup, such as attaching a debugger or configuring job objects. +- returns `false` instead of throwing when no process with the given ID exists. +- and open a handle to an existing process by ID. ```csharp var startInfo = new ProcessStartInfo("worker.exe") { StartSuspended = true }; @@ -236,7 +236,7 @@ The new `JsonUnionAttribute` and `JsonUnionCaseInfo` APIs, along with type-class #### Closed-hierarchy polymorphism inference - adds `JsonSerializerOptions.InferClosedTypePolymorphism` so the serializer can infer polymorphic metadata for C# closed hierarchies without requiring explicit annotations on each base type. Explicit registrations still take precedence. + adds so the serializer can infer polymorphic metadata for C# closed hierarchies without requiring explicit annotations on each base type. Explicit registrations still take precedence. ### Regular expression improvements @@ -276,7 +276,7 @@ Additionally, a new now supports password-protected entries for read and write operations. Use the new password-aware `Open` and `OpenAsync` overloads, and use password plus `ZipEncryptionMethod` when you create encrypted entries. + now supports password-protected entries for read and write operations. Use the new password-aware and overloads, and use password plus when you create encrypted entries. #### DeflateStream and GZipStream behavior change @@ -334,15 +334,15 @@ Because the three outer-join operations return tuples directly, you can work wit ### IEEE 754 decimal floating-point types - adds `Decimal32`, `Decimal64`, and `Decimal128`, which implement IEEE 754-2019 decimal floating-point semantics. These types support generic math, infinities, and NaN values, and can help when you need IEEE decimal behavior instead of . + adds , , and , which implement IEEE 754-2019 decimal floating-point semantics. These types support generic math, infinities, and NaN values, and can help when you need IEEE decimal behavior instead of . ### Partial numeric parsing -`System.Numerics.INumberBase.TryParsePartial()` adds partial parsing overloads that report consumed input. Use this API to parse delimited formats, such as CSV, so you don't copy substrings. + adds partial parsing overloads that report consumed input. Use this API to parse delimited formats, such as CSV, so you don't copy substrings. ### Generic Complex\ -`System.Numerics.Complex` is now available, so complex arithmetic can use several floating-point types, including `float`, `Half`, `BFloat16`, and the new decimal floating-point types. + is now available, so complex arithmetic can use several floating-point types, including `float`, `Half`, `BFloat16`, and the new decimal floating-point types. #### Tuple-returning Join and GroupJoin overloads @@ -502,7 +502,7 @@ A new constant has ### Assembly.Location override for AssemblyLoadContext -`AssemblyLoadContext.SetAssemblyLocationOverride` is a set-once callback that can override the location reported by . This API helps hosts that stage assemblies in temporary paths or virtualized locations report stable, meaningful locations to diagnostics and resource-loading code. + is a set-once callback that can override the location reported by . This API helps hosts that stage assemblies in temporary paths or virtualized locations report stable, meaningful locations to diagnostics and resource-loading code. ### Reduced contention in System.IO.Pipelines @@ -681,15 +681,15 @@ Two items improve TLS (Trans ### HTTP request compression - adds `GZipCompressedContent`, `BrotliCompressedContent`, and `ZstandardCompressedContent` wrappers for request bodies. These wrappers set the `Content-Encoding` header and stream compressed content as the request serializes. + adds , , and wrappers for request bodies. These wrappers set the `Content-Encoding` header and stream compressed content as the request serializes. ### Configurable HTTP connection eviction - now provides `ShouldEvictConnection` for per-connection eviction decisions. This callback lets you retire connections based on age, endpoint details, and DNS changes instead of fixed lifetime-only policies. + now provides for per-connection eviction decisions. This callback lets you retire connections based on age, endpoint details, and DNS changes instead of fixed lifetime-only policies. ### DNS record resolution APIs - adds typed record-resolution APIs, including `ResolveSrv()`, `ResolveMx()`, `ResolveTxt()`, `ResolveCName()`, `ResolvePtr()`, and `ResolveNs()`, together with `Async` variants. The results include records, response code, and negative-cache time-to-live (TTL) metadata through `DnsResult`. + adds typed record-resolution APIs, including , , , , , and , together with `Async` variants. The results include records, response code, and negative-cache time-to-live (TTL) metadata through . ### HTTP/2 automatic downgrade for Windows authentication diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index 16218a9666bb5..c3422e530cf46 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -33,9 +33,9 @@ For more information, see [What's new in the .NET 11 runtime](runtime.md). The .NET 11 libraries include new APIs for: -- expansion with run-and-capture helpers, fire-and-forget launches, `SafeProcessHandle` lifecycle methods, tighter handle control, and new `ProcessStartInfo.StartSuspended` for suspended starts and `Process.TryGetProcessById` for safe process lookup. +- expansion with run-and-capture helpers, fire-and-forget launches, lifecycle methods, tighter handle control, and new for suspended starts and for safe process lookup. - Compression, including improved Base64 APIs, new methods for ZIP archive entries, Zstandard compression in , and CRC32 validation when reading ZIP entries. -- New numeric APIs, including IEEE 754 decimal floating-point types (`Decimal32`, `Decimal64`, and `Decimal128`), `INumberBase.TryParsePartial` for delimiter-aware parsing, and generic `System.Numerics.Complex`. +- New numeric APIs, including IEEE 754 decimal floating-point types (, , and ), for delimiter-aware parsing, and generic . - System.Text.Json improvements, including generic type info retrieval, , per-member naming policy overrides, type-level ignore conditions, F# discriminated union support, with options, `SerializeAsyncEnumerable` overloads for `PipeWriter` targets and top-level values (NDJSON) output, and serialization of C# union types. - Built-in OpenTelemetry metrics for . - Discriminated-union scaffolding (`UnionAttribute` and `IUnion`) in . diff --git a/docs/core/whats-new/dotnet-11/runtime.md b/docs/core/whats-new/dotnet-11/runtime.md index b920d1443134f..73ab4e7e7fc86 100644 --- a/docs/core/whats-new/dotnet-11/runtime.md +++ b/docs/core/whats-new/dotnet-11/runtime.md @@ -2,7 +2,7 @@ title: What's new in .NET 11 runtime description: Learn about the new features introduced in the .NET 11 runtime. titleSuffix: "" -ms.date: 08/12/2026 +ms.date: 08/15/2026 ai-usage: ai-assisted ms.update-cycle: 3650-days --- @@ -152,12 +152,11 @@ The runtime now detects when a continuation has nothing to restore and skips the - **Redundant checked context removal:** The JIT can now prove and remove redundant checked arithmetic contexts—for example, when a value is already known to be in range. This optimization eliminates unnecessary overflow checks in generated code. - **Switch expression folding:** Multi-target `switch` expressions now fold into simpler branchless checks when the targets are a small set of constants, for example `x is 0 or 1 or 2 or 3 or 4`. - **Faster uint-to-float/double casts:** Casting `uint` to `float` or `double` is faster on pre-AVX-512 x86 hardware. -- **Devirtualization in ReadyToRun images:** ReadyToRun (R2R) images can now devirtualize non-shared generic virtual method calls, improving performance of ahead-of-time compiled code for generic scenarios. - **SVE2 intrinsics:** New Arm SVE2 (Scalable Vector Extension 2) intrinsics are available: `ShiftRightLogicalNarrowingSaturate(Even|Odd)`. These expand the set of vectorized operations available on Arm hardware that supports SVE2. - **`Math.BigMul` on x64:** `Math.BigMul(long, long, out long)` is now significantly faster on x64. The JIT generates a single `MUL r/m64` instruction when both operands are 64-bit values and the caller requests the high half of the result, eliminating the previous helper call. - **Single-IG prolog restriction removed:** The JIT no longer requires the function prolog to fit in a single instruction group (IG). Complex prologues with many saved registers, large stack allocations, or runtime-async state setup no longer trigger fallback paths. - **`SELECT(cond, cns, cns)` folding:** The JIT now folds conditional selects whose two branches both produce the same constant into just that constant—for example, `condition ? 42 : 42` becomes `42`. This fold eliminates unnecessary comparisons that can appear after earlier optimizations unify branches. -- **AVX-VNNI-512 intrinsics:** `AvxVnni.V51` adds 512-bit dot-product intrinsics for CPUs that support `AVX512-VNNI`. +- **AVX-VNNI-512 intrinsics:** exposes 512-bit forms of the `AVX-VNNI` multiply-add intrinsics on CPUs with `AVX512-VNNI` support. - **Saturating floating-point conversions:** Unchecked `float` and `double` conversions to small integer types now saturate to type bounds instead of wrapping through intermediate truncation. - **ARM64 `Vector` by reference for SVE:** When the runtime is compiled with ARM SVE support, `Vector` values are passed by reference rather than by value, aligning with the ARM calling convention for scalable types and enabling better code generation for SVE-intensive code. @@ -173,6 +172,41 @@ static bool IsAdmin(string role) => role == "Admin"; The optimization applies to string literals, `const string` fields, and UTF-8 literals (for example, `"PNG"u8`). +### Devirtualization improvements + +The JIT can now devirtualize generic virtual methods, including non-shared generic virtual methods and shared generic virtual methods that don't require a runtime lookup. Default interface methods declared on generic interfaces can now be devirtualized as well. + +In addition, the result of `Activator.CreateInstance()` is now treated as having an exact type, allowing the JIT to devirtualize subsequent calls made on the returned object. + +These improvements unlock further downstream optimizations such as inlining and constant folding, reducing runtime dispatch overhead and improving performance. For example: + +```csharp +IfaceGeneric caller = new Caller(); +Iface obj = Activator.CreateInstance(); +caller.DefaultImpl(obj, "test"); // Can be optimized down to Console.WriteLine("test") + +interface Iface +{ + void GenericMethod(T value); +} + +interface IfaceGeneric +{ + void DefaultImpl(Iface obj, T value) => obj.GenericMethod(value); +} + +class Impl : Iface +{ + public void GenericMethod(T value) => Console.WriteLine(value); +} + +class Caller : IfaceGeneric +{ +} +``` + +Here the JIT can determine the exact implementation behind both interface calls, devirtualize them, inline through the call chain, and ultimately fold the code down to the equivalent of `Console.WriteLine("test")`. + ### Eliminating bounds checks after an empty-span guard The JIT now picks up the `length != 0` assertion from an empty-span check and uses it to prove the bounds check on the first element succeeds: diff --git a/docs/csharp/fundamentals/expressions/index.md b/docs/csharp/fundamentals/expressions/index.md new file mode 100644 index 0000000000000..d36c29dae0f52 --- /dev/null +++ b/docs/csharp/fundamentals/expressions/index.md @@ -0,0 +1,105 @@ +--- +title: "C# expressions overview" +description: Learn how C# expressions work, how operator precedence and evaluation order determine results, how to use parentheses for clarity, and how short-circuit evaluation works. +ms.date: 08/13/2026 +ms.topic: concept-article +ai-usage: ai-assisted +--- + +# C# expressions + +> [!TIP] +> This article is part of the **Fundamentals** section for developers who already know at least one programming language and are learning C#. If you're new to programming, start with the [Get started](../../tour-of-csharp/tutorials/index.md) tutorials first. +> +> **Coming from another language?** Expressions in C# work much as they do in Java, C++, and JavaScript. One difference worth noting: compound assignment operators like `+=` and the increment operator `++` are expressions in C#, so they can appear in larger expressions. + +An *expression* is a piece of code that the compiler evaluates to produce a value — a number, a string, a reference, or a `bool`. For example, `3 + 4 * 2` is an expression that evaluates to the integer `11`, and `total > 10` is an expression that evaluates to `true` or `false`. + +The simplest expressions are *literals* (like `42` or `"hello"`) and *variable names* (like `total`). You build more complex expressions by combining simpler ones with operators. + +### Expressions and statements + +An expression produces a value. A *statement* is a complete instruction that the program executes. Many statements contain expressions. For example, `int total = 3 + 4 * 2;` is a variable declaration statement. The compiler evaluates the initializer expression `3 + 4 * 2`, which produces `11`, and assigns that value to the new variable `total`. This article focuses on expressions — how they're formed, how they're evaluated, and how they combine. + +## Combining expressions + +Expressions can be combined. Consider `3 + 4 * 2`. This single expression actually contains two smaller expressions: the *multiplication expression* `4 * 2` and the *addition expression* `3 + `. When expressions are combined, C# needs a rule to decide which one to evaluate first. That rule is *operator precedence*. + +You don't need to memorize the complete precedence hierarchy. The next section summarizes the everyday groups, and parentheses always let you make the order explicit when you're unsure. + +## Operator precedence + +*Operator precedence* determines how a combined expression *groups* into sub-expressions. This concept is similar to the order-of-operations rules from math class. An operator with higher precedence *binds more tightly* to its operands. The expression is structured as if those operands are parenthesized together. In `3 + 4 * 2`, `*` has higher precedence than `+`, so the expression groups as `3 + (4 * 2)`, not `(3 + 4) * 2`. + +C# has more precedence groups than the four summarized here. Those additional groups enforce familiar rules — for example, multiplication before addition — and cover the complete set of operators. The following groups cover what you encounter most often in everyday code: + +1. **Primary, unary, and range** — these are three distinct precedence groups, all of which bind more tightly than arithmetic. This summary combines them into one step because, for practical purposes, they all apply before arithmetic. + - *Primary* operators — member access (`x.y`), method calls (`f()`), indexing (`a[i]`), and null-conditional access (`?.`, `?[]`) — bind most tightly of all. + - *Unary* operators act on a single operand: negation (`-x`), logical NOT (`!flag`), prefix increment (`++i`), and postfix increment (`i++`). + - The *range* operator (`..`) builds index ranges for slice expressions, like `array[1..4]`. +2. **Arithmetic** — `*`, `/`, `%` bind more tightly than `+` and `-`. Multiplication and division happen before addition and subtraction. +3. **Comparison** — `<`, `>`, `<=`, `>=`, `==`, `!=` bind less tightly than arithmetic, so arithmetic completes before the comparison. +4. **Logical** — `&&` and `||` bind least tightly of the common operators, so comparisons complete before the logical combination. + +This precedence means the expression `score + bonus > threshold && attempts < maxAttempts` evaluates exactly as you'd read it: add `score` and `bonus`, compare the sum to `threshold`, compare `attempts` to `maxAttempts`, then combine the two `bool` results with `&&`. Adding parentheses to make every grouping explicit shows the same structure: `((score + bonus) > threshold) && (attempts < maxAttempts)`. + +For the complete precedence hierarchy covering every operator, see [C# operators and expressions](../../language-reference/operators/index.md). + +### Use parentheses to make intent clear + +Parentheses override precedence and document your intent at the same time. When the order isn't obvious from the groups above, add parentheses: + +:::code language="csharp" source="snippets/expressions/Program.cs" ID="ParenthesesClarity"::: + +The last two lines show that parentheses can change the result, not just the style. When `&&` and `||` appear together, add parentheses to spell out which condition combines first. A reader who sees `(isAdmin && isOwner) || isSuperUser` knows the intent immediately. + +## How expressions are evaluated + +Understanding how C# evaluates combined expressions is easier with an analogy. Think of working through a complex math problem with pencil and paper: you identify the innermost or highest-precedence sub-expression, compute its interim value, write down the result, then repeat with the next sub-expression — continuing until you reach the final answer. + +C# follows the same process, guided by two rules: + +**Rule 1: Operands evaluate left to right.** For any binary expression, both operands must be fully evaluated before the operator is applied. C# evaluates the left operand first, then the right, then performs the operation. + +**Rule 2: Some operators short-circuit.** Certain operators stop evaluating as soon as the result is determined, skipping any remaining operands: + +- `&&` (conditional AND): returns `false` as soon as the left side is `false`. The right side is never evaluated. +- `||` (conditional OR): returns `true` as soon as the left side is `true`. The right side is never evaluated. +- `?:` (conditional/ternary): evaluates only the branch that matches the condition — the other branch is never evaluated. +- `?.` (null-conditional member access) and `?[]` (null-conditional element access): stop and return `null` immediately when the left side is `null`, skipping the member access or index. +- `??=` (null-coalescing assignment): assigns the right side only when the left side is `null`. + +### Paper-and-pencil evaluation + +Consider the expression `3 + 6 / 2`. Even though addition appears first in reading order, `/` has higher precedence than `+`, so `6 / 2` is the sub-expression that evaluates first. Working through it step by step — exactly as you would on paper: + +``` +3 + 6 / 2 + ↓ (evaluate 6 / 2 → 3) +3 + 3 + ↓ (evaluate 3 + 3 → 6) + 6 +``` + +:::code language="csharp" source="snippets/expressions/Program.cs" ID="StepByStep"::: + +The interim value `3` produced by `6 / 2` becomes the right operand of `+`, and the final result is `6`. Each sub-expression produces an interim value; those interim values feed the next sub-expression, until only one value remains. + +*Associativity* is a related concept: when two operators have the same precedence, associativity decides which one goes first. Most C# operators are *left-associative*, meaning they group left to right. So `a - b - c` is the same as `(a - b) - c`, not `a - (b - c)`. + +### Short-circuit evaluation in practice + +Short-circuit evaluation is particularly useful for null checks: + +:::code language="csharp" source="snippets/expressions/Program.cs" ID="ShortCircuit"::: + +`text != null && text.Length > 0` is safe because the second condition runs only when `text` isn't `null`. Similarly, `?.` stops evaluation when it encounters a `null` reference, which avoids a `NullReferenceException` without an explicit `if` check. + +For a broader look at null-safe operators, see [C# null operators](../null-safety/null-operators.md). + +## See also + +- [C# operators and expressions (language reference)](../../language-reference/operators/index.md) — full precedence table and every operator +- [Equality comparisons](equality.md) — how `==`, `!=`, and `Equals` work +- [C# null operators](../null-safety/null-operators.md) — `?.`, `??`, and `??=` +- [Boolean logical operators](../../language-reference/operators/boolean-logical-operators.md) diff --git a/docs/csharp/fundamentals/expressions/snippets/expressions/Program.cs b/docs/csharp/fundamentals/expressions/snippets/expressions/Program.cs new file mode 100644 index 0000000000000..b28e27bd5182d --- /dev/null +++ b/docs/csharp/fundamentals/expressions/snippets/expressions/Program.cs @@ -0,0 +1,58 @@ +// +int score = 80; +int bonus = 15; +int threshold = 90; +bool eligible = true; + +// Without parentheses: || binds less tightly than &&, so this reads as: +// eligible && (score + bonus > threshold) || bonus > 20 +bool result1 = eligible && score + bonus > threshold || bonus > 20; + +// With parentheses: forces the || to combine two complete conditions +bool result2 = (eligible && score + bonus > threshold) || bonus > 20; + +Console.WriteLine(result1); // => True +Console.WriteLine(result2); // => True + +// Parentheses can also change the result: +bool isAdmin = false; +bool isOwner = true; + +// Without: && binds tighter, so: (isAdmin && isOwner) || true +bool access1 = isAdmin && isOwner || true; +// With: forces the || to run first +bool access2 = isAdmin && (isOwner || true); + +Console.WriteLine(access1); // => True (false && true is false; false || true is true) +Console.WriteLine(access2); // => False (false && anything is false) +// + +// +// 3 + 6 / 2 +// Step 1: 6 / 2 has higher precedence → interim value 3 +// Step 2: 3 + 3 → final result 6 +int result = 3 + 6 / 2; +Console.WriteLine(result); // => 6 +// + +// +string? text = null; + +// Safe: second condition runs only when text is not null +bool hasContent = text != null && text.Length > 0; +Console.WriteLine(hasContent); // => False (short-circuits after null check; no NullReferenceException) + +text = "hello"; +hasContent = text != null && text.Length > 0; +Console.WriteLine(hasContent); // => True + +// || short-circuits on true: right side is never evaluated when left side is true +string word = "hello"; +bool anyMatch = word.StartsWith("h") || word.StartsWith("x"); +Console.WriteLine(anyMatch); // => True (right side never evaluated) + +// ?. short-circuits on null: returns null without accessing .Length +string? maybeNull = null; +int? length = maybeNull?.Length; // length is null; no NullReferenceException +Console.WriteLine(length.HasValue); // => False +// diff --git a/docs/csharp/fundamentals/expressions/snippets/expressions/expressions.csproj b/docs/csharp/fundamentals/expressions/snippets/expressions/expressions.csproj new file mode 100644 index 0000000000000..dfb40caafcf9a --- /dev/null +++ b/docs/csharp/fundamentals/expressions/snippets/expressions/expressions.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + + diff --git a/docs/csharp/language-reference/attributes/general.md b/docs/csharp/language-reference/attributes/general.md index d7a029b4827d9..b4151802def8d 100644 --- a/docs/csharp/language-reference/attributes/general.md +++ b/docs/csharp/language-reference/attributes/general.md @@ -263,7 +263,7 @@ Overload resolution considers the two methods equally good for some argument typ :::code language="csharp" source="snippets/OrpaSnippets.cs" ID="SnippetOrpaExample"::: -All overloads with a lower priority than the highest overload priority are removed from the set of applicable methods. Methods without this attribute have the overload priority set to the default of zero. Library authors should use this attribute as a last resort when adding a new and better method overload. Library authors should have a deep understanding of how [Overload resolution](~/_csharplang/proposals/csharp-13.0/overload-resolution-priority.md#overload-resolution-priority) impacts choosing the better method. Otherwise, unexpected errors can result. +All overloads with a lower priority than the highest overload priority are removed from the set of applicable methods. Methods without this attribute have the overload priority set to the default of zero. Library authors should use this attribute as a last resort when adding a new and better method overload. Library authors should have a deep understanding of how [overload resolution priority](~/_csharpstandard/standard/attributes.md#23514-the-overloadresolutionpriority-attribute) impacts choosing the better method. Otherwise, unexpected errors can result. ## EnumeratorCancellation attribute diff --git a/docs/csharp/language-reference/builtin-types/snippets/unions/MemberProvider.cs b/docs/csharp/language-reference/builtin-types/snippets/unions/MemberProvider.cs index c5b01ab8ef560..acea902404ecf 100644 --- a/docs/csharp/language-reference/builtin-types/snippets/unions/MemberProvider.cs +++ b/docs/csharp/language-reference/builtin-types/snippets/unions/MemberProvider.cs @@ -12,7 +12,7 @@ public interface IUnionMembers static Outcome Create(Exception? value) => new(value); object? Value { get; } - // only when needed + // Optional but recommended: TryGetValue enables efficient pattern matching bool TryGetValue(out T value); bool TryGetValue(out Exception value); } diff --git a/docs/csharp/language-reference/builtin-types/union.md b/docs/csharp/language-reference/builtin-types/union.md index c621e10c63eb1..9e572f759a5fd 100644 --- a/docs/csharp/language-reference/builtin-types/union.md +++ b/docs/csharp/language-reference/builtin-types/union.md @@ -1,7 +1,7 @@ --- title: "Union types" description: Learn about union types in C#. Unions express values from a closed set of types with exhaustive pattern matching support. -ms.date: 06/05/2026 +ms.date: 08/14/2026 f1_keywords: - "union_CSharpKeyword" helpviewer_keywords: @@ -141,7 +141,7 @@ Any class or struct with a `[Union]` attribute is a *union type* if it follows t - One or more public constructors, each with a single by-value or `in` parameter. The parameter type of each constructor defines a *case type*. - A public `Value` property of type `object?` (or `object`) with a `get` accessor. -All the preceding union members must be public. The compiler uses these members to implement union conversions, pattern matching, and exhaustiveness checks. You can also implement the [non-boxing access pattern](#non-boxing-access-pattern) or create a [class-based union type](#class-based-union-types). Your custom union type can add additional members. +All the preceding union members must be public. The compiler uses these members to implement union conversions, pattern matching, and exhaustiveness checks. You can also implement the [non-boxing access pattern](#non-boxing-access-pattern) or create a [class-based union type](#class-based-union-types). Your custom union type can add more members. The compiler assumes that custom union types satisfy these behavioral rules: @@ -167,11 +167,28 @@ A custom union type can optionally implement the *non-boxing access pattern* to :::code language="csharp" source="snippets/unions/NonBoxingAccess.cs" id="NonBoxingExample"::: -The compiler prefers `TryGetValue` over the `Value` property when implementing pattern matching, which avoids boxing value types. +For pattern matching, the compiler calls `TryGetValue` for type-pattern checks (such as `union is T`) and `HasValue` for null-pattern checks (such as `union is null`), avoiding boxing for value-type cases. Each member applies to its own pattern kind—neither is a fallback for the other. When a member is missing, the compiler checks the `Value` property for that pattern instead. For more information, see [How the compiler generates code for pattern matching](#union-member-providers). ### Union member providers -A union type can delegate its union members to a nested `IUnionMembers` interface. When this interface is present, the `union` type behaves as a *union member provider*. The compiler generates code to call the `IUnionMembers` interface. It won't generate calls to members declared on the union type that aren't members of the nested `IUnionMembers` interface. As the following example shows, that means you must add the necessary factory methods and the appropriate `TryGetValue` methods for all case types: +A union type can delegate its union members to a nested `IUnionMembers` interface. When this interface is present, the `union` type behaves as a *union member provider*, and the compiler generates calls only to the members declared on `IUnionMembers`. Members declared on the union type itself, but omitted from the `IUnionMembers` interface, aren't used by the compiler. + +When using a union member provider, the interface must declare these required members: + +- **Static `Create` methods**: One for each case type, with a single parameter and a return type identity-convertible to the union type. These methods establish your case types. +- **`Value` property**: A public `object` or `object?` property with a `get` accessor that returns the contained value. + +You can optionally declare these members on the interface so the compiler generates more efficient pattern matching code: + +- **`TryGetValue` methods**: One for each case type, returning `bool` with an `out` parameter of the case type. +- **`HasValue` property**: A public `bool` property with a `get` accessor returning `true` when `Value` isn't `null`. + +**How the compiler generates code for pattern matching**: `TryGetValue` and `HasValue` apply to different kinds of patterns—neither is a fallback for the other: + +- For a *type pattern*, such as `union is T`, the compiler calls `TryGetValue(out T value)` when declared, extracting the value and applying the pattern to it without boxing. Otherwise, the compiler applies the pattern to the `Value` property, which performs a runtime type check against `T` and can box the value when `T` is a value type. +- For a *null pattern*, such as `union is null`, the compiler calls `HasValue` when declared to test whether the union contains a value. Otherwise, the compiler applies the null pattern to the `Value` property directly. + +Each member is independently optional: without `TryGetValue`, type patterns use `Value`; without `HasValue`, null patterns use `Value`. Declaring either member lets the compiler generate more efficient, strongly typed code for that pattern kind: :::code language="csharp" source="snippets/unions/MemberProvider.cs" id="MemberProvider"::: diff --git a/docs/csharp/language-reference/compiler-messages/cs7034.md b/docs/csharp/language-reference/compiler-messages/cs7034.md new file mode 100644 index 0000000000000..84b0c31f4dedf --- /dev/null +++ b/docs/csharp/language-reference/compiler-messages/cs7034.md @@ -0,0 +1,54 @@ +--- +description: "Compiler Error CS7034" +title: "Compiler Error CS7034" +ms.date: 8/18/2026 +f1_keywords: + - "CS7034" +helpviewer_keywords: + - "CS7034" +--- +# Compiler Error CS7034 + +The specified version string 'version' does not conform to the required format - major[.minor[.build[.revision]]] + +This error occurs when: + +1. specified 'version' does not meet the requirements of it's format: major[.minor[.build[.revision]]], for example `2.0.3.4`, or `2.0.3`. + +2. one or more components of specified 'version' is equal to or greater than - 1. + +## Example + +The following example generates CS7034 due to incorrect format of 'version' given as `AssemblyVersion`: + +```csharp +// AssemblyInfo.cs +using System.Reflection; + +// General Information about an assembly is controlled through the following set of attributes. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] + +[assembly: AssemblyVersion("1.1.0-patch-5")] // CS7034 +``` + +The following example generates CS7034 due to one of 'version' component exceeding the maximum value: + +```csharp +// AssemblyInfo.cs +using System.Reflection; + +// General Information about an assembly is controlled through the following set of attributes. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] + +[assembly: AssemblyVersion("1.1.0.65678")] // CS7034 +``` + +## To correct this error + +Keep the 'version' string aligned with the format requirements: `major[.minor[.build[.revision]]]`, with each component not exceeding the maximum value of 65535. + +## See also + +- [AssemblyVersionAttribute Class]() diff --git a/docs/csharp/language-reference/compiler-messages/cs7035.md b/docs/csharp/language-reference/compiler-messages/cs7035.md new file mode 100644 index 0000000000000..5b07066b5699d --- /dev/null +++ b/docs/csharp/language-reference/compiler-messages/cs7035.md @@ -0,0 +1,54 @@ +--- +description: "Compiler Warning (level 4) CS7035" +title: "Compiler Warning (level 4) CS7035" +ms.date: 8/18/2026 +f1_keywords: + - "CS7035" +helpviewer_keywords: + - "CS7035" +--- +# Compiler Warning (level 4) CS7035 + +The specified version string 'version' does not conform to the recommended format - major.minor.build.revision + +This warning occurs when: + +1. specified 'version' does not meet the requirements of it's format: major.minor.build.revision, for example `2.0.3.4`, or `2.0.3`. + +2. one or more components of specified 'version' is equal to or greater than - 1. + +## Example + +The following example generates CS7035 warning due to incorrect format of 'version' given as `AssemblyVersion`: + +```csharp +// AssemblyInfo.cs +using System.Reflection; + +// General Information about an assembly is controlled through the following set of attributes. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] + +[assembly: AssemblyFileVersion("1.1.0-ver5")] // CS7035 +``` + +The following example generates CS7035 due to one of 'version' component exceeding the maximum value: + +```csharp +// AssemblyInfo.cs +using System.Reflection; + +// General Information about an assembly is controlled through the following set of attributes. +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] + +[assembly: AssemblyFileVersion("1.1.0.65678")] // CS7035 +``` + +## To correct this warning + +Keep the 'version' string aligned with the format requirements: `major.minor.build.revision`, with each component not exceeding the maximum value of 65535. + +## See also + +- [AssemblyFileVersionAttribute Class]() diff --git a/docs/csharp/language-reference/compiler-messages/cs8124.md b/docs/csharp/language-reference/compiler-messages/cs8124.md deleted file mode 100644 index 3b745c8740486..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8124.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -description: "Compiler Error CS8124" -title: "Compiler Error CS8124" -ms.date: 9/30/2022 -f1_keywords: - - "CS8124" -helpviewer_keywords: - - "CS8124" ---- -# Compiler Error CS8124 - -Tuple must contain at least two elements. - -## Example - - The following sample generates CS8124: - -```csharp -// CS8124.cs (4,20) - -class C -{ - void M(int x, () y, (int a) z) { } -} -``` - -## To correct this error - -A valid tuple declaration contains two or more elements, ensuring tuple declarations have two or more elements corrects this error: - -```csharp -class C -{ - void M(int x, (int, int) y, (int a, int b) z) { } -} -``` diff --git a/docs/csharp/language-reference/compiler-messages/cs8125.md b/docs/csharp/language-reference/compiler-messages/cs8125.md deleted file mode 100644 index 6d7a2a7cb44c6..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8125.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -description: "Compiler Error CS8125" -title: "Compiler Error CS8125" -ms.date: 9/30/2022 -f1_keywords: - - "CS8125" -helpviewer_keywords: - - "CS8125" ---- -# Compiler Error CS8125 - -Tuple element name is only allowed at position. - -## Example - - The following sample generates CS8125: - -```csharp -// CS8125.cs (2,15) - -public class C -{ - public void Method() - { - var tuple3 = (Item2: 2, Item1: 1); - } -} -``` - -## To correct this error - -If tuple element names `Item1`, `Item2`, etc. are used, ensuring the correct order corrects this error: - -```csharp - public void Method() - { - var tuple3 = (Item1: 2, Item2: 1); - } -``` diff --git a/docs/csharp/language-reference/compiler-messages/cs8127.md b/docs/csharp/language-reference/compiler-messages/cs8127.md deleted file mode 100644 index 036fa67654075..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8127.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -description: "Compiler Error CS8127" -title: "Compiler Error CS8127" -ms.date: 9/30/2022 -f1_keywords: - - "CS8127" -helpviewer_keywords: - - "CS8127" ---- -# Compiler Error CS8127 - -Tuple element names must be unique. - -## Example - - The following sample generates CS8127: - -```csharp -// CS8127.cs (7,0) - -internal struct NewStruct -{ - public int a; - public int b; - - public static implicit operator (int a, int a)(NewStruct value) - { - return (value.a, value.b); - } -} -``` - -## To correct this error - -Ensuring the names of elements within a tuple declaration are unique corrects this error: - -```csharp - public static implicit operator (int a, int b)(NewStruct value) - { - return (value.a, value.b); - } -``` diff --git a/docs/csharp/language-reference/compiler-messages/cs8139.md b/docs/csharp/language-reference/compiler-messages/cs8139.md deleted file mode 100644 index d7c863eee3804..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8139.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -description: "Compiler Error CS8139" -title: "Compiler Error CS8139" -ms.date: 9/30/2022 -f1_keywords: - - "CS8139" -helpviewer_keywords: - - "CS8139" ---- -# Compiler Error CS8139 - -cannot change tuple element names when overriding inherited member - -## Example - - The following sample generates CS8139: - -```csharp -// CS8139.cs (9,38) - -public class Base -{ - public virtual (object a, object b) M((object c, object d) x) { return x; } -} - -class C : Base -{ - public override (object, object) M((object c, object d) y) { return y; } -} -``` - -## To correct this error - -Ensuring the tuple element names in the overriding member match those in the virtual member corrects this error: - -```csharp -class C : Base -{ - public override (object a, object b) M((object c, object d) y) { return y; } -} -``` diff --git a/docs/csharp/language-reference/compiler-messages/cs8140.md b/docs/csharp/language-reference/compiler-messages/cs8140.md deleted file mode 100644 index 4628539900de7..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8140.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -description: "Compiler Error CS8140" -title: "Compiler Error CS8140" -ms.date: 9/30/2022 -f1_keywords: - - "CS8140" -helpviewer_keywords: - - "CS8140" ---- -# Compiler Error CS8140 - -is already listed in the interface list on type with different tuple element names, as. - -## Example - - The following sample generates CS8140: - -```csharp -// CS8140.cs (11,7) - -interface I -{ - T GetValue(); -} - -interface I2 : I<(int c, int d)> -{ -} - -class C : I<(int a, int b)>, I2 -{ - public (int c, int d) GetValue() - { - return (1, 2); - } -} -``` - -## To correct this error - -Renaming the tuple element names to match the interface declaration corrects this error: - -```csharp -interface I -{ - T GetValue(); -} - -interface I2 : I<(int c, int d)> -{ -} - -class C : I<(int c, int d)>, I2 -{ - public (int c, int d) GetValue() - { - return (1, 2); - } -} -``` diff --git a/docs/csharp/language-reference/compiler-messages/cs8141.md b/docs/csharp/language-reference/compiler-messages/cs8141.md deleted file mode 100644 index 8e99744d298ac..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8141.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -description: "Compiler Error CS8141" -title: "Compiler Error CS8141" -ms.date: 9/30/2022 -f1_keywords: - - "CS8141" -helpviewer_keywords: - - "CS8141" ---- -# Compiler Error CS8141 - -The tuple element names in the signature of method must match the tuple element names of interface method (including on the return type). - -## Example - -The following sample generates CS8141: - -```csharp -// CS8141.cs (10,27) -using System.Collections; - -public interface IGrabber -{ - T GetOne(); -} - -class SomeGrabber : IGrabber<(int, int)> -{ - public (int a, int b) GetOne() - { - return (1, 2); - } -} -``` - -## To correct this error - -Changing the signature of the `GetOne` method to return an unnamed tuple, matching the unnamed tuple in the interface, will correct this error: - -```csharp - public (int, int) GetOne() - { - return (1, 2); - } -``` diff --git a/docs/csharp/language-reference/compiler-messages/cs8210.md b/docs/csharp/language-reference/compiler-messages/cs8210.md deleted file mode 100644 index 1969a7e5e8e53..0000000000000 --- a/docs/csharp/language-reference/compiler-messages/cs8210.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -description: "Compiler Error CS8210" -title: "Compiler Error CS8210" -ms.date: 10/26/2022 -f1_keywords: - - "CS8210" -helpviewer_keywords: - - "CS8210" ---- -# Compiler Error CS8210 - -A tuple may not contain a value of type 'void'. - -## Example - - The following sample generates CS8210: - -```csharp -// CS8210.cs -void Method() -{ -} - -void Test() -{ - var x = ("something", Method()); -} -``` - -Your method returns `void`, so that method doesn't return a value. You can't use a method that returns `void` for a data member of a tuple. - -## See also - -- [Tuple](../builtin-types/value-tuples.md) -- [Void](../builtin-types/void.md) diff --git a/docs/csharp/language-reference/compiler-messages/tuple-errors.md b/docs/csharp/language-reference/compiler-messages/tuple-errors.md new file mode 100644 index 0000000000000..54b58e2bd7772 --- /dev/null +++ b/docs/csharp/language-reference/compiler-messages/tuple-errors.md @@ -0,0 +1,148 @@ +--- +title: "Resolve errors and warnings related to tuples" +description: "This article helps you diagnose and correct compiler errors and warnings related to tuple declarations, element names, metadata, conversions, equality, type inference, and pattern matching." +f1_keywords: + - "CS8123" + - "CS8124" + - "CS8125" + - "CS8126" + - "CS8127" + - "CS8128" + - "CS8135" + - "CS8137" + - "CS8138" + - "CS8139" + - "CS8140" + - "CS8141" + - "CS8142" + - "CS8179" + - "CS8182" + - "CS8210" + - "CS8307" + - "CS8383" + - "CS8384" + - "CS8516" + - "CS8522" +helpviewer_keywords: + - "CS8123" + - "CS8124" + - "CS8125" + - "CS8126" + - "CS8127" + - "CS8128" + - "CS8135" + - "CS8137" + - "CS8138" + - "CS8139" + - "CS8140" + - "CS8141" + - "CS8142" + - "CS8179" + - "CS8182" + - "CS8210" + - "CS8307" + - "CS8383" + - "CS8384" + - "CS8516" + - "CS8522" +ms.date: 08/17/2026 +ai-usage: ai-assisted +--- + +# Resolve errors and warnings for tuples + +This article covers the following compiler errors and warnings: + + + +- [**CS8123**](#tuple-element-names): *The tuple element name 'name' is ignored because a different name or no name is specified by the target type 'type'.* +- [**CS8124**](#tuple-structure-and-literals): *Tuple must contain at least two elements.* +- [**CS8125**](#tuple-element-names): *Tuple element name 'name' is only allowed at position N.* +- [**CS8126**](#tuple-element-names): *Tuple element name 'name' is disallowed at any position.* +- [**CS8127**](#tuple-element-names): *Tuple element names must be unique.* +- [**CS8128**](#valuetuple-infrastructure): *Member 'member' was not found on type 'type' from assembly 'assembly'.* +- [**CS8135**](#tuple-structure-and-literals): *Tuple with 'count' elements cannot be converted to type 'type'.* +- [**CS8137**](#tuple-metadata): *Cannot define a class or member that utilizes tuples because the compiler required type 'type' cannot be found. Are you missing a reference?* +- [**CS8138**](#tuple-metadata): *Cannot reference 'System.Runtime.CompilerServices.TupleElementNamesAttribute' explicitly. Use the tuple syntax to define tuple names.* +- [**CS8139**](#tuple-element-names-in-type-hierarchy): *'member': cannot change tuple element names when overriding inherited member 'base member'.* +- [**CS8140**](#tuple-element-names-in-type-hierarchy): *'interface' is already listed in the interface list on type 'type' with different tuple element names, as 'alias'.* +- [**CS8141**](#tuple-element-names-in-type-hierarchy): *The tuple element names in the signature of method 'method' must match the tuple element names of interface method 'interface method' (including on the return type).* +- [**CS8142**](#tuple-element-names-in-type-hierarchy): *Both partial member declarations, 'member' and 'other partial', must use the same tuple element names.* +- [**CS8179**](#valuetuple-infrastructure): *Predefined type 'type' is not defined or imported.* +- [**CS8182**](#valuetuple-infrastructure): *Predefined type 'type' must be a struct.* +- [**CS8210**](#tuple-structure-and-literals): *A tuple may not contain a value of type 'void'.* +- [**CS8307**](#tuple-type-inference): *The first operand of an 'as' operator may not be a tuple literal without a natural type.* +- [**CS8383**](#tuple-equality): *The tuple element name 'name' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.* +- [**CS8384**](#tuple-equality): *Tuple types used as operands of an == or != operator must have matching cardinalities. But this operator has tuple types of cardinality 'left' on the left and 'right' on the right.* +- [**CS8516**](#pattern-matching-with-tuples): *The name 'name' does not identify tuple element 'element'.* +- [**CS8522**](#pattern-matching-with-tuples): *Element names are not permitted when pattern-matching via 'System.Runtime.CompilerServices.ITuple'.* + +## Tuple element names + +- **CS8123**: *The tuple element name 'name' is ignored because a different name or no name is specified by the target type 'type'.* +- **CS8125**: *Tuple element name 'name' is only allowed at position N.* +- **CS8126**: *Tuple element name 'name' is disallowed at any position.* +- **CS8127**: *Tuple element names must be unique.* + +The compiler warns when tuple element names conflict with the target type or constraints. The compiler ignores names in tuple literals during type conversion. If the target type expects different names or no names, rename the tuple literal to match the target type or change the target type (**CS8123**). `ItemN` names are reserved for their specific positions (`Item1` at position 1, `Item2` at position 2, and so on). Reorder elements or use custom names (**CS8125**). Names like `Rest`, `ToString`, `GetHashCode`, and `Equals` are reserved for `ValueTuple` infrastructure and can't be used as element names. Choose a different name (**CS8126**). Ensure all element names within a tuple are distinct. Rename any duplicates (**CS8127**). + +## Tuple element names in type hierarchy + +- **CS8139**: *'member': cannot change tuple element names when overriding inherited member 'base member'.* +- **CS8140**: *'interface' is already listed in the interface list on type 'type' with different tuple element names, as 'alias'.* +- **CS8141**: *The tuple element names in the signature of method 'method' must match the tuple element names of interface method 'interface method' (including on the return type).* +- **CS8142**: *Both partial member declarations, 'member' and 'other partial', must use the same tuple element names.* + +Tuple element names are part of method signatures and must be consistent across inheritance, interface implementation, and partial declarations. Match tuple element names in overriding methods to the base member (**CS8139**). Align element names across all base types and interface implementations so that all inheritance paths to the same generic interface use matching element names (**CS8140**). Match element names in interface implementations to the interface declaration, for both parameters and return types (**CS8141**). Update one partial declaration to match the other exactly (**CS8142**). + +## Tuple metadata + +- **CS8137**: *Cannot define a class or member that utilizes tuples because the compiler required type 'type' cannot be found. Are you missing a reference?* +- **CS8138**: *Cannot reference 'System.Runtime.CompilerServices.TupleElementNamesAttribute' explicitly. Use the tuple syntax to define tuple names.* + +When a type signature includes named tuples, the compiler must reference to store element names in metadata. Ensure your project references a .NET runtime that provides , or add the `System.Runtime` NuGet package for older frameworks (**CS8137**). Use tuple literal syntax with element names—for example, `(int x, string y)`—instead of explicitly referencing the attribute. The compiler generates the metadata automatically (**CS8138**). + +## ValueTuple infrastructure + +- **CS8128**: *Member 'member' was not found on type 'type' from assembly 'assembly'.* +- **CS8179**: *Predefined type 'type' is not defined or imported.* +- **CS8182**: *Predefined type 'type' must be a struct.* + +These errors occur when the compiler can't find or validate required types that underlie tuple syntax. Add the `System.ValueTuple` NuGet package for frameworks that don't include it built-in (for example, older .NET Framework versions) (**CS8179**). Verify that `ValueTuple` types are structs, not classes. If a custom class shadows system types, remove or rename it (**CS8182**). If a specific member (`Item1`, `Item2`, `Rest`) is missing from the predefined `ValueTuple` type, verify that your project references the correct runtime or NuGet package version (**CS8128**). + +## Tuple structure and literals + +- **CS8124**: *Tuple must contain at least two elements.* +- **CS8135**: *Tuple with 'count' elements cannot be converted to type 'type'.* +- **CS8210**: *A tuple may not contain a value of type 'void'.* + +These errors relate to tuple expression formation. Tuples require at least two elements; convert single-element or zero-element tuples to two or more elements (**CS8124**). Ensure tuple literals have the same element count as the destination type (**CS8135**). Remove `void`-returning method calls from tuple elements; tuples can only contain values, not `void` results (**CS8210**). + +## Tuple type inference + +- **CS8307**: *The first operand of an 'as' operator may not be a tuple literal without a natural type.* + +**CS8307** occurs when a tuple literal without explicit element types is used as the left operand of an `as` operator. Assign the literal to a typed variable first, then apply `as` to the variable, or annotate the tuple with an explicit type before using `as` (**CS8307**). + +## Tuple equality + +- **CS8383**: *The tuple element name 'name' is ignored because a different name or no name is specified on the other side of the tuple == or != operator.* +- **CS8384**: *Tuple types used as operands of an == or != operator must have matching cardinalities. But this operator has tuple types of cardinality 'left' on the left and 'right' on the right.* + +**CS8383** is a warning when `==` or `!=` operands have different or absent element names. Names don't affect equality semantics (comparison is positional), but mismatches often indicate naming inconsistency. Align element names on both sides or use unnamed tuples (**CS8383**). **CS8384** occurs when `==` or `!=` operands have different numbers of elements. Adjust tuple literals or types so both operands have the same element count (**CS8384**). + +## Pattern matching with tuples + +- **CS8516**: *The name 'name' does not identify tuple element 'element'.* +- **CS8522**: *Element names are not permitted when pattern-matching via 'System.Runtime.CompilerServices.ITuple'.* + +**CS8516** occurs when a tuple pattern uses a property name that doesn't match any element of the tuple type. Verify the element names of the tuple type and correct the pattern property name. **CS8522** occurs when a positional pattern uses named subpatterns against a type that implements but isn't a known tuple type. Remove element names from the pattern and match positionally. + +## See also + +- [Value tuples](../builtin-types/value-tuples.md) +- [Deconstruction](../../fundamentals/functional/deconstruct.md) +- [Pattern matching](../../fundamentals/functional/pattern-matching.md) +- [Void](../builtin-types/void.md) diff --git a/docs/csharp/language-reference/keywords/closed.md b/docs/csharp/language-reference/keywords/closed.md index 485d7921c746a..498917b94e919 100644 --- a/docs/csharp/language-reference/keywords/closed.md +++ b/docs/csharp/language-reference/keywords/closed.md @@ -1,7 +1,7 @@ --- title: "closed modifier" description: "Learn about the closed class modifier in C#. A closed class restricts derivation to its declaring assembly so consumers can write exhaustive switch expressions over its direct descendants." -ms.date: 06/02/2026 +ms.date: 08/14/2026 f1_keywords: - "closed" - "closed_CSharpKeyword" @@ -75,12 +75,10 @@ For more information about how the compiler determines exhaustiveness, including ## Type parameters constrained to a closed type -A type parameter constrained to a closed class is treated as that closed class for exhaustiveness checks. A `switch` expression whose governing value has such a type parameter is exhaustive when it handles every direct descendant of the closed constraint: +The [closed hierarchies feature specification](~/_csharplang/proposals/csharp-15.0/closed-hierarchies.md#exhaustiveness-of-type-parameters-constrained-to-closed-type) treats a type parameter constrained to a closed class the same as that closed class for exhaustiveness checks: a `switch` expression whose governing value has such a type parameter is exhaustive when it handles every direct descendant of the closed constraint, regardless of whether the type parameter appears on a method or on the containing type: :::code language="csharp" source="./snippets/shared/Closed.cs" id="TypeParameterConstrained"::: -This rule applies whether the type parameter appears on a method or on the containing type. - ## C# language specification For more information, see the [Closed hierarchies](~/_csharplang/proposals/csharp-15.0/closed-hierarchies.md) feature specification. diff --git a/docs/csharp/language-reference/keywords/safe.md b/docs/csharp/language-reference/keywords/safe.md index 1b125e6e90b5d..c1258cef5f2bc 100644 --- a/docs/csharp/language-reference/keywords/safe.md +++ b/docs/csharp/language-reference/keywords/safe.md @@ -1,7 +1,7 @@ --- description: "safe modifier - C# Reference" title: "safe modifier" -ms.date: 06/17/2026 +ms.date: 08/14/2026 ai-usage: ai-assisted f1_keywords: - "safe_CSharpKeyword" @@ -14,14 +14,14 @@ helpviewer_keywords: The `safe` contextual keyword attests that a declaration is sound in places where the [updated memory safety model](../unsafe-code.md#the-updated-memory-safety-model-preview) requires you to make the safety choice explicit. You apply `safe` as a modifier on a declaration that the compiler can't classify on its own, such as an `extern` member or a field in a struct with explicit layout. The `safe` modifier is the counterpart to [`unsafe`](unsafe.md): `safe` attests that callers need no `unsafe` context, while `unsafe` propagates the obligation to audit safety to the caller. > [!IMPORTANT] -> The `safe` keyword is part of the updated memory safety model, a preview feature in C# 15 and .NET 11. The compiler in .NET 11 Preview 5 doesn't yet recognize the keyword. To follow the feature, set the [`LangVersion`](../compiler-options/language.md#langversion) compiler option to `preview`. For the full design, see the [memory safety feature specification](~/_csharplang/proposals/unsafe-evolution.md). The code in this article shows the proposed syntax and doesn't compile with the current preview compiler. +> The `safe` keyword is part of the updated memory safety model, a preview feature in C# 15 and .NET 11. The compiler accepts `safe` as a modifier on `extern` members and explicit-layout fields. However, there's no public opt-in for the updated caller-safety rules yet, so the compiler doesn't enforce the safety choice that `safe` and [`unsafe`](unsafe.md) express: omitting both modifiers doesn't produce an error, and neither modifier changes what callers can do. To follow the feature, set the [`LangVersion`](../compiler-options/language.md#langversion) compiler option to `preview`. For the full design, see the [memory safety feature specification](~/_csharplang/proposals/unsafe-evolution.md). ## Extern members An `extern` member calls into native code, so the compiler can't classify its safety. Under the updated model, you mark every `extern` declaration, including a `LibraryImport` partial method, either `safe` or `unsafe`: ```csharp -// Preview: illustrates the updated model, which the current compiler doesn't enforce yet. +// Compiles under LangVersion preview, but the safety choice isn't enforced yet. [LibraryImport("libc")] internal static safe partial int getpid(); @@ -29,14 +29,14 @@ internal static safe partial int getpid(); internal static unsafe partial nint strlen(byte* str); ``` -`getpid` takes no parameters and returns a primitive, so the author attests that the call is safe, and callers use it without an `unsafe` context. `strlen` takes a raw pointer that the native code dereferences, so the declaration is `unsafe` and propagates the obligation to its callers. Omitting both modifiers is an error, which forces you to make the safety decision. +`getpid` takes no parameters and returns a primitive, so the author attests that the call is safe, and callers use it without an `unsafe` context. `strlen` takes a raw pointer that the native code dereferences, so the declaration is `unsafe` and propagates the obligation to its callers. Omitting both modifiers is intended to be an error under the updated model, but the compiler doesn't yet enforce that rule because there's no public opt-in for the updated rules. ## Explicit-layout fields In a struct with `[StructLayout(LayoutKind.Explicit)]`, fields can overlap in memory, so the compiler can't reason about whether a read through one field is sound. You mark every field of such a struct either `safe` or `unsafe`: ```csharp -// Preview +// Compiles under LangVersion preview, but the safety choice isn't enforced yet. [StructLayout(LayoutKind.Explicit)] internal struct Union { @@ -48,7 +48,7 @@ internal struct Union } ``` -A field that holds a native pointer, or whose type otherwise carries an invariant the type system can't express, is `unsafe`. A field whose type is fully described by the type system is `safe`. As with `extern` members, omitting both modifiers is an error. +A field that holds a native pointer, or whose type otherwise carries an invariant the type system can't express, is `unsafe`. A field whose type is fully described by the type system is `safe`. As with `extern` members, omitting both modifiers is intended to be an error under the updated model, but the compiler doesn't yet enforce that rule. ## C# language specification diff --git a/docs/csharp/language-reference/keywords/snippets/shared/Closed.cs b/docs/csharp/language-reference/keywords/snippets/shared/Closed.cs index c8e5f76834b18..cc2f622b0b974 100644 --- a/docs/csharp/language-reference/keywords/snippets/shared/Closed.cs +++ b/docs/csharp/language-reference/keywords/snippets/shared/Closed.cs @@ -42,7 +42,8 @@ public static class ClosedSwitchExamples Running(var percent) => $"{percent}% complete", Completed(var elapsed) => $"finished in {elapsed.TotalSeconds:F1}s", Failed(var error) => $"failed: {error}", - // No warning: 'X' is constrained to a closed type, so its direct descendants exhaust the switch. + // No warning: 'X' is constrained to a closed type, so the compiler treats + // this switch as exhaustive because every direct descendant is handled. }; // } diff --git a/docs/csharp/language-reference/keywords/snippets/shared/ClosedAttribute.cs b/docs/csharp/language-reference/keywords/snippets/shared/ClosedAttribute.cs deleted file mode 100644 index f3f21d0d57a6c..0000000000000 --- a/docs/csharp/language-reference/keywords/snippets/shared/ClosedAttribute.cs +++ /dev/null @@ -1,6 +0,0 @@ -// In preview 5 of C# 15, the runtime doesn't yet define ClosedAttribute, -// so projects that use the 'closed' modifier must declare it. -namespace System.Runtime.CompilerServices; - -[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -public sealed class ClosedAttribute : Attribute { } diff --git a/docs/csharp/language-reference/keywords/unsafe.md b/docs/csharp/language-reference/keywords/unsafe.md index 8783ac231b49b..b387ebcfbbf8c 100644 --- a/docs/csharp/language-reference/keywords/unsafe.md +++ b/docs/csharp/language-reference/keywords/unsafe.md @@ -1,7 +1,7 @@ --- description: "unsafe keyword - C# Reference" title: "unsafe keyword" -ms.date: 06/16/2026 +ms.date: 08/14/2026 f1_keywords: - "unsafe_CSharpKeyword" - "unsafe" @@ -43,7 +43,7 @@ To compile unsafe code, you must specify the [**AllowUnsafeBlocks**](../compiler > [!NOTE] > The [memory safety](../unsafe-code.md#the-updated-memory-safety-model-preview) preview feature available in C# 15 narrows the operations that require an `unsafe` context. > An `unsafe` context is no longer required for creating a pointer, the `fixed` statement, converting a `stackalloc` expression to a pointer, and using `sizeof` on an unmanaged type. -> Only operations that access the pointed-to memory, such as pointer indirection, still require an `unsafe` context. A later preview also changes `unsafe` on a member to mark it as *requires-unsafe*, so callers must use the member from an `unsafe` context. +> Only operations that access the pointed-to memory, such as pointer indirection, still require an `unsafe` context. The same preview also adds an `unsafe(expression)` form that establishes an unsafe context for a single expression, for positions where an `unsafe` block can't appear, such as a field initializer or a `catch` filter. For more information, see [Unsafe expressions](../unsafe-code.md#unsafe-expressions). The preview also gives the `unsafe` modifier on a member a new meaning: the compiler recognizes it as marking the member *requires-unsafe*. Caller enforcement of that obligation isn't implemented yet, so marking a member `unsafe` currently has no effect on its callers. For more information, see [Caller-unsafe members](../unsafe-code.md#caller-unsafe-members). ## Example diff --git a/docs/csharp/language-reference/operators/collection-expressions.md b/docs/csharp/language-reference/operators/collection-expressions.md index 030a07adca0d8..f77bed277eda6 100644 --- a/docs/csharp/language-reference/operators/collection-expressions.md +++ b/docs/csharp/language-reference/operators/collection-expressions.md @@ -1,7 +1,7 @@ --- title: "Collection expressions (Collection literals)" description: Collection expressions convert to many collection types. You can write literal values, expressions, or other collections to create a new collection. -ms.date: 02/04/2026 +ms.date: 08/14/2026 helpviewer_keywords: - "Collection expressions" --- @@ -60,7 +60,7 @@ The compiler uses static analysis to determine the most performant way to create Many APIs are overloaded with multiple collection types as parameters. Because a collection expression can be converted to many different expression types, these APIs might require casts on the collection expression to specify the correct conversion. The following conversion rules resolve some of the ambiguities: -- A better element conversion is preferred over a better collection type conversion. In other words, the type of elements in the collection expression has more importance than the type of the collection. These rules are described in the feature spec for [better conversion from collection expression](~/_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md). +- A better element conversion is preferred over a better collection type conversion. In other words, the type of elements in the collection expression has more importance than the type of the collection. These rules are described in the [better conversion from expression](~/_csharpstandard/standard/expressions.md#12645-better-conversion-from-expression) clause of the C# language specification. - Conversion to , , or another [`ref struct`](../builtin-types/ref-struct.md) type is better than a conversion to a non-ref struct type. - Conversion to a noninterface type is better than a conversion to an interface type. @@ -105,23 +105,23 @@ The first parameter provides the name of the *Builder* class. The second attribu Starting in C# 15, you can pass arguments to the underlying collection's constructor or factory method by using a `with(...)` element as the first element in a collection expression. This feature enables you to specify capacity, comparers, or other constructor parameters directly within the collection expression syntax. For more information, see the [collection expression arguments feature specification](~/_csharplang/proposals/csharp-15.0/collection-expression-arguments.md). -The `with(...)` element must be the first element in the collection expression. The arguments declared in the `with(...)` element are passed to the appropriate constructor or create method based on the target type. You can use any valid expression for the arguments in the `with` element. +The `with(...)` element must be the first element in the collection expression. The arguments declared in the `with(...)` element go to the appropriate constructor or create method based on the target type. You can use any valid expression for the arguments in the `with` element. ### Constructor arguments -When the target type is a class or struct that implements , the arguments in `with(...)` are evaluated and the results are passed to the constructor. The compiler uses overload resolution to select the best matching constructor: +When the target type is a class or struct that implements , the arguments in `with(...)` are evaluated and the results go to the constructor. The compiler uses overload resolution to select the best matching constructor: :::code language="csharp" source="./snippets/shared/CollectionExpressionExamples.cs" id="WithArgumentsExamples"::: In the preceding example: -- The `List` constructor with a `capacity` parameter is called with `values.Length * 2`. -- The `HashSet` constructor with an parameter is called with `StringComparer.OrdinalIgnoreCase`. +- The `List` constructor with a `capacity` parameter gets called with `values.Length * 2`. +- The `HashSet` constructor with an parameter gets called with `StringComparer.OrdinalIgnoreCase`. - For interface target types like , the compiler creates a `List` with the specified capacity. ### Collection builder arguments -For types with a , the arguments declared in the `with(...)` element are evaluated and the results are passed to the create method *before* the `ReadOnlySpan` parameter. This feature allows create methods to accept configuration parameters: +For types with a , the arguments declared in the `with(...)` element get evaluated and the results go to the create method *before* the `ReadOnlySpan` parameter. This feature allows create methods to accept configuration parameters: :::code language="csharp" source="./snippets/shared/CollectionExpressionExamples.cs" id="BuilderClassWithComparer"::: @@ -129,7 +129,7 @@ You can then use the `with(...)` element to pass the comparer: :::code language="csharp" source="./snippets/shared/CollectionExpressionExamples.cs" id="WithBuilderArgumentsExample"::: -The create method is selected using overload resolution based on the arguments provided. The `ReadOnlySpan` containing the collection elements is always the last parameter. +The create method gets selected by using overload resolution based on the arguments you provide. The `ReadOnlySpan` containing the collection elements is always the last parameter. ### Interface target types @@ -149,3 +149,4 @@ The `with(...)` element has the following restrictions: - It must be the first element in the collection expression. - Arguments can't have `dynamic` type. - It's not supported for arrays or span types (`Span`, `ReadOnlySpan`). +- The arguments in `with(...)` don't affect whether a conversion exists from the collection expression to a candidate target type. The compiler ignores them during overload resolution and type inference. Only the presence of a `with(...)` element, not its arguments, affects whether the conversion exists. diff --git a/docs/csharp/language-reference/operators/patterns.md b/docs/csharp/language-reference/operators/patterns.md index b31b74725679c..7d65eff105073 100644 --- a/docs/csharp/language-reference/operators/patterns.md +++ b/docs/csharp/language-reference/operators/patterns.md @@ -1,7 +1,7 @@ --- title: "Patterns - Pattern matching using the is and switch expressions." description: "Learn about the patterns supported by the `is` and `switch` expressions. Combine multiple patterns using the `and`, `or`, and `not` operators." -ms.date: 06/05/2026 +ms.date: 08/14/2026 f1_keywords: - "and_CSharpKeyword" - "or_CSharpKeyword" @@ -274,7 +274,7 @@ For more information, see the [Discard pattern](~/_csharpstandard/standard/patte ## Parenthesized pattern -You can put parentheses around any pattern. Typically, you do this to emphasize or change the precedence in [logical patterns](#logical-patterns), as the following example shows: +You can put parentheses around any pattern. Typically, you use parentheses to emphasize or change the precedence in [logical patterns](#logical-patterns), as the following example shows: :::code language="csharp" source="snippets/patterns/LogicalPatterns.cs" id="ChangedPrecedence"::: @@ -320,7 +320,7 @@ For example, a closed `public` base class can have an `internal` direct descenda To restore exhaustiveness in assembly 2, add a discard arm (`_ => ...`), add a base class arm (`Shape` in the preceding example), or make every direct descendant at least as accessible as the closed base type. -When the governing type is nullable, `null` is an additional value the switch must handle. A switch over `PaymentMethod?` that omits a `null` arm isn't exhaustive even when every direct descendant is matched. +When the governing type is nullable, `null` is an extra value the switch must handle. A switch over `PaymentMethod?` that omits a `null` arm isn't exhaustive even when every direct descendant is matched. Derivation from a closed class isn't transitive: a non-closed descendant of a closed class can be derived from in other assemblies. The compiler only treats the *direct* descendants as the exhaustive set. To make a switch over a descendant also benefit from exhaustiveness checking, declare the descendant `closed` (or `sealed`). @@ -355,11 +355,11 @@ If you want exhaustiveness to follow the hierarchy further down, declare `Car` i A switch whose governing type is `Vehicle` has choices: Code that handles `Car` and `Truck` is still exhaustive, because the `Car` arm covers every subtype of `Car`. Marking `Car` `closed` simply gives you a second option for that switch. You can keep the single `Car` arm, or replace it with one arm per direct descendant of `Car` (alongside the `Truck` arm) and still be exhaustive. -Marking `Car` `closed` also makes it implicitly `abstract`, which means you can no longer create instances of `Car` directly. That might not fit your design. If you need `Car` to remain instantiable, leave it open and dispatch on the specific subtypes you care about by ordering arms as shown earlier. +Marking `Car` `closed` also makes it implicitly `abstract`, which means you can no longer create instances of `Car` directly. That condition might not fit your design. If you need `Car` to remain instantiable, leave it open and dispatch on the specific subtypes you care about by ordering arms as shown earlier. ### Type parameter governing types -A `switch` expression whose governing type is a type parameter constrained to a closed class is exhaustive on the same terms as a switch over the closed class itself. To dispatch on a closed hierarchy from generic code, constrain the type parameter to the closed base and handle every direct descendant: +The [closed hierarchies feature specification](~/_csharplang/proposals/csharp-15.0/closed-hierarchies.md#exhaustiveness-of-type-parameters-constrained-to-closed-type) defines a `switch` expression whose governing type is a type parameter constrained to a closed class as exhaustive on the same terms as a switch over the closed class itself. So, generic code can dispatch on a closed hierarchy by constraining the type parameter to the closed base and handling every direct descendant: :::code language="csharp" source="snippets/patterns/ClosedHierarchyPatterns.cs" id="TypeParamGoverningType"::: @@ -385,7 +385,7 @@ Three patterns are exceptions: the discard `_` pattern, the `var` pattern, and t The `null` pattern checks whether the union's `Value` is null. For class-based unions, `null` also succeeds when the union reference itself is null. -When a union type provides the *non-boxing access pattern* (`HasValue` and `TryGetValue` members), the compiler uses those members to avoid boxing value-type cases during pattern matching. +When a union type provides the *non-boxing access pattern*, the compiler calls `TryGetValue` for type-pattern checks and `HasValue` for null-pattern checks, avoiding boxing for value-type cases. Each member applies to its own pattern kind—neither is a fallback for the other. When a member is missing, the compiler checks the `Value` property for that pattern instead. For more information, see [Union matching](../builtin-types/union.md#union-pattern-matching). For the specification, see [Unions](~/_csharplang/proposals/csharp-15.0/unions.md). diff --git a/docs/csharp/language-reference/operators/snippets/patterns/ClosedAttribute.cs b/docs/csharp/language-reference/operators/snippets/patterns/ClosedAttribute.cs deleted file mode 100644 index f3f21d0d57a6c..0000000000000 --- a/docs/csharp/language-reference/operators/snippets/patterns/ClosedAttribute.cs +++ /dev/null @@ -1,6 +0,0 @@ -// In preview 5 of C# 15, the runtime doesn't yet define ClosedAttribute, -// so projects that use the 'closed' modifier must declare it. -namespace System.Runtime.CompilerServices; - -[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -public sealed class ClosedAttribute : Attribute { } diff --git a/docs/csharp/language-reference/operators/snippets/patterns/ClosedHierarchyPatterns.cs b/docs/csharp/language-reference/operators/snippets/patterns/ClosedHierarchyPatterns.cs index 2c7e580004c66..72f9a030c25cd 100644 --- a/docs/csharp/language-reference/operators/snippets/patterns/ClosedHierarchyPatterns.cs +++ b/docs/csharp/language-reference/operators/snippets/patterns/ClosedHierarchyPatterns.cs @@ -92,8 +92,8 @@ public static class TypeParamGoverningTypeExamples Cash => "cash", Card(var last4) => $"card ending {last4}", BankTransfer(var iban) => $"bank transfer to {iban}", - // No warning: 'X' is constrained to the closed type 'PaymentMethod', - // so handling every direct descendant exhausts the switch. + // No warning: 'X' is constrained to the closed type 'PaymentMethod', so the + // compiler treats this switch as exhaustive because every direct descendant is handled. }; // } diff --git a/docs/csharp/language-reference/snippets/memory-safety/Program.cs b/docs/csharp/language-reference/snippets/memory-safety/Program.cs index 73fa4a9ef4bc8..9560ff0f708a4 100644 --- a/docs/csharp/language-reference/snippets/memory-safety/Program.cs +++ b/docs/csharp/language-reference/snippets/memory-safety/Program.cs @@ -4,3 +4,5 @@ MemorySafety.Relaxations.AllocateOnStack(); System.Console.WriteLine(MemorySafety.Relaxations.SizeOfStruct()); System.Console.WriteLine(MemorySafety.Relaxations.ReadValue([10, 20, 30])); +System.Console.WriteLine(MemorySafety.Relaxations.Signature); +System.Console.WriteLine(await MemorySafety.Relaxations.ReadSignatureAsync()); diff --git a/docs/csharp/language-reference/snippets/memory-safety/Relaxations.cs b/docs/csharp/language-reference/snippets/memory-safety/Relaxations.cs index 9add8867496c0..bdb9c1b58154d 100644 --- a/docs/csharp/language-reference/snippets/memory-safety/Relaxations.cs +++ b/docs/csharp/language-reference/snippets/memory-safety/Relaxations.cs @@ -1,7 +1,9 @@ -// This file demonstrates the C# 15 memory safety relaxations verified against -// .NET 11 Preview 5. Creating pointers, the fixed statement, stackalloc-to-pointer, -// and sizeof no longer require an unsafe context. Only operations that access the -// pointed-to memory still require one. +// This file demonstrates the C# 15 memory safety relaxations and the `unsafe` +// expression. Creating pointers, the fixed statement, stackalloc-to-pointer, +// and sizeof no longer require an unsafe context. Only operations that access +// the pointed-to memory still require one. + +using System.Threading.Tasks; namespace MemorySafety; @@ -58,4 +60,33 @@ public static int ReadValue(int[] numbers) } } // + + // + // A field initializer can't contain an unsafe block, but it can contain an + // unsafe expression. The unsafe context ends at the closing parenthesis. + public static readonly int Signature = unsafe(ReadSignature()); + + private static unsafe int ReadSignature() + { + int rawValue = 0x1234; + int* pointer = &rawValue; + return *pointer; + } + // + + // + public static async Task ReadSignatureAsync() + { + // The unsafe expression scopes the unsafe context to the call that + // produces the task. The 'await' itself stays outside that context. + return await unsafe(ReadSignatureCoreAsync()); + } + + private static unsafe Task ReadSignatureCoreAsync() + { + int rawValue = 0x1234; + int* pointer = &rawValue; + return Task.FromResult(*pointer); + } + // } diff --git a/docs/csharp/language-reference/toc.yml b/docs/csharp/language-reference/toc.yml index 6d25c0e978bc3..3f1067e5ca663 100644 --- a/docs/csharp/language-reference/toc.yml +++ b/docs/csharp/language-reference/toc.yml @@ -518,6 +518,13 @@ items: displayName: > CS0017, CS0028, CS0402, CS1555, CS1556, CS1557, CS1558, CS1559, CS2017, CS5001, CS7022, CS8801, CS8802, CS8803, CS8805, CS8899, CS8937 + - name: Tuple declarations + href: ./compiler-messages/tuple-errors.md + displayName: > + tuples, tuple element names, tuple metadata, tuple conversions, tuple equality, tuple pattern matching, + CS8123, CS8124, CS8125, CS8126, CS8127, CS8128, CS8135, CS8137, CS8138, CS8139, + CS8140, CS8141, CS8142, CS8179, CS8182, CS8210, CS8307, CS8383, CS8384, CS8516, + CS8522 - name: Record declarations href: ./compiler-messages/record-declaration-errors.md displayName: > @@ -1553,14 +1560,12 @@ items: href: ../misc/cs2035.md - name: CS7003 href: ./compiler-messages/cs7003.md + - name: CS7034 + href: ./compiler-messages/cs7034.md + - name: CS7035 + href: ./compiler-messages/cs7035.md - name: CS8070 href: ./compiler-messages/cs8070.md - - name: CS8124 - href: ./compiler-messages/cs8124.md - - name: CS8125 - href: ./compiler-messages/cs8125.md - - name: CS8127 - href: ./compiler-messages/cs8127.md - name: CS8129 href: ./compiler-messages/cs8129.md - name: CS8130 @@ -1569,12 +1574,6 @@ items: href: ./compiler-messages/cs8131.md - name: CS8132 href: ./compiler-messages/cs8132.md - - name: CS8139 - href: ./compiler-messages/cs8139.md - - name: CS8140 - href: ./compiler-messages/cs8140.md - - name: CS8141 - href: ./compiler-messages/cs8141.md - name: CS8146 href: ./compiler-messages/cs8146.md - name: CS8147 @@ -1615,8 +1614,6 @@ items: href: ./compiler-messages/cs8173.md - name: CS8174 href: ./compiler-messages/cs8174.md - - name: CS8210 - href: ./compiler-messages/cs8210.md - name: CS8333 href: ./compiler-messages/cs8333.md - name: CS8334 diff --git a/docs/csharp/language-reference/unsafe-code.md b/docs/csharp/language-reference/unsafe-code.md index df901da6e488c..9fe6a1e5bfa02 100644 --- a/docs/csharp/language-reference/unsafe-code.md +++ b/docs/csharp/language-reference/unsafe-code.md @@ -1,7 +1,7 @@ --- title: "Unsafe code, pointers to data, and function pointers" description: Learn about unsafe code, pointers, and function pointers. C# uses an unsafe context for operations that access unmanaged memory or invoke function pointers (unmanaged delegates). -ms.date: 06/17/2026 +ms.date: 08/14/2026 ai-usage: ai-assisted f1_keywords: - "functionPointer_CSharpKeyword" @@ -215,7 +215,7 @@ This example accesses the elements of both arrays by using indices rather than a ## The updated memory safety model (preview) > [!IMPORTANT] -> The updated memory safety model is a preview feature in C# 15 and .NET 11. It continues to evolve based on feedback during the preview releases. To try the model, use the .NET 11 (preview) SDK and set the [`LangVersion`](compiler-options/language.md#langversion) compiler option to `preview`. The compiler in .NET 11 Preview 5 implements the pointer relaxations but doesn't yet enforce the caller obligations, the assembly opt-in, or the `safe` keyword. For the full design, see the [memory safety feature specification](~/_csharplang/proposals/unsafe-evolution.md). +> The updated memory safety model is a preview feature in C# 15 and .NET 11. It continues to evolve based on feedback during the preview releases. To try the model, use the .NET 11 (preview) SDK and set the [`LangVersion`](compiler-options/language.md#langversion) compiler option to `preview`. The compiler currently implements the pointer relaxations and `unsafe` expressions, and it recognizes the `safe` keyword. It doesn't yet enforce caller-unsafe obligations or the assembly opt-in: there's no public opt-in property yet, so `unsafe` and `safe` have no effect on callers. For the full design, see the [memory safety feature specification](~/_csharplang/proposals/unsafe-evolution.md). The updated model separates two things the original model treats as one: the *existence* of pointer code and the *propagation* of safety obligations to callers. Marking a member `unsafe` no longer just permits pointers in its body; it makes the member *caller-unsafe*, so every caller must either propagate that obligation or discharge it behind a validated, safe-callable boundary. To support that separation, the model also narrows the unsafe context: the existence of a pointer isn't unsafe, only the operations that access memory the runtime doesn't manage. The narrowing lets you hold, pass, and return pointers in safe code, while `unsafe` marks the operations and members that can actually violate memory safety. @@ -286,9 +286,23 @@ The following example creates and pins pointers without an `unsafe` context: These relaxations apply whenever you compile with the `preview` language version, whether or not an assembly opts in to the updated memory safety rules. +### Unsafe expressions + +An `unsafe` expression, `unsafe(expression)`, creates an unsafe context for evaluating a single expression. It's useful in situations where an `unsafe` block can't appear syntactically, such as a field initializer, a constructor initializer, or the `when` clause of a `catch` clause. The unsafe context ends at the closing parenthesis, so it doesn't extend to the rest of the containing statement. + +The following example dereferences a pointer inside a field initializer, a position that can't contain an `unsafe` block: + +:::code language="csharp" source="snippets/memory-safety/Relaxations.cs" id="UnsafeExpression"::: + +An `unsafe` expression also lets you scope the unsafe context around one operand of `await`, instead of wrapping the whole `await` expression in an `unsafe` block. The `await` itself stays outside the unsafe context; only the call that produces the awaited task runs inside it: + +:::code language="csharp" source="snippets/memory-safety/Relaxations.cs" id="AwaitUnsafeExpression"::: + +Like other unsafe code, an `unsafe` expression requires the [**AllowUnsafeBlocks**](compiler-options/language.md#allowunsafeblocks) compiler option, and it requires the `preview` language version. + ### Discharge caller-unsafe obligations -A member that calls a caller-unsafe operation has two choices: propagate the obligation, or discharge it. +A member that calls a caller-unsafe operation has two choices: propagate the obligation or discharge it. - **Propagate**: Mark your own member `unsafe`. The obligation passes to your callers. Use propagation when you can't fully validate the obligation yourself. - **Discharge**: Leave your member's signature safe. Validate the obligation inside the member, usually with runtime guards, then perform the unsafe operation in an inner `unsafe` block. A member that contains an inner `unsafe` block but doesn't mark its own signature `unsafe` is an *unsafe boundary*: it turns unsafe code into a safe-callable surface. diff --git a/docs/csharp/language-reference/xmldoc/recommended-tags.md b/docs/csharp/language-reference/xmldoc/recommended-tags.md index fcf299fd1baf6..5816e41448bf0 100644 --- a/docs/csharp/language-reference/xmldoc/recommended-tags.md +++ b/docs/csharp/language-reference/xmldoc/recommended-tags.md @@ -1,7 +1,7 @@ --- title: "Recommended XML documentation tags" description: This article provides the syntax and definitions for recommended tags on types, and their members for XML documentation. -ms.date: 01/16/2026 +ms.date: 08/14/2026 f1_keywords: - "" - "summary" @@ -228,7 +228,7 @@ The `` tag provides a way to indicate that a word in the code comments - cref = "`member`": A reference to an exception that's available from the current compilation environment. The compiler checks that the given exception exists and translates `member` to the canonical element name in the output XML. `member` must appear within quotation marks ("). -The `` tag lets you specify which exceptions can be thrown. Apply this tag to definitions for methods, properties, events, and indexers. +The `` tag lets you specify which exceptions a member can throw. Apply this tag to definitions for methods, properties, events, and indexers. ### `` @@ -244,7 +244,7 @@ The `` tag lets you describe the value that a property represents. When y description ``` -Use the `` tag to document the contract that a caller of a *caller-unsafe* member must satisfy. The [updated memory safety model](../unsafe-code.md#the-updated-memory-safety-model-preview), which is in preview in C# 15 and .NET 11, marks a member `unsafe` to push the obligation to audit safety onto the caller. The `` block states the conditions the caller must guarantee, so the contract lives in the documentation where every caller and reviewer sees it. You can also place a `` block on an `unsafe` field to record the invariant that the enclosing type maintains. +Use the `` tag to document the contract that a caller of a *caller-unsafe* member must satisfy under the [updated memory safety model](../unsafe-code.md#the-updated-memory-safety-model-preview), a preview feature in C# 15 and .NET 11. In the completed design, marking a member `unsafe` pushes the obligation to audit safety onto the caller, and the `` block states the conditions the caller must guarantee. The current preview compiler doesn't yet enforce that obligation—see the caveat in [Unsafe code, pointer types, and function pointers](../unsafe-code.md#the-updated-memory-safety-model-preview)—so today, `` documents a contract you maintain by convention. You can also place a `` block on an `unsafe` field to record the invariant that the enclosing type maintains. The C# compiler doesn't recognize or process the `` tag. Like any custom tag, the compiler copies it verbatim to the output XML file. A memory safety analyzer might flag a caller-unsafe member that's missing a `` block, but the compiler itself doesn't enforce its presence or contents. For more information, see [Safety documentation](../unsafe-code.md#safety-documentation). @@ -417,12 +417,12 @@ Recommendation: ``` -- `filename`: The name of the XML file containing the documentation. You can qualify the file name with a path relative to the source code file. Enclose `filename` in single quotation marks (' '). -- `path`: The path of the tags in `filename` that leads to the XML comment to use. The path can include one or multiple attributes like `name`, but they're not required. The attributes can have values like `id`, but values aren't required either. Enclose the path including possible attributes in single quotation marks (' '). +- `filename`: The name of the XML file containing the documentation. Qualify the file name with a path relative to the source code file. Enclose `filename` in single quotation marks (' '). +- `path`: The path of the tags in `filename` that leads to the XML comment to use. The path can include one or multiple attributes like `name`, but they're not required. The attributes can have values like `id`, but values aren't required either. Enclose the path, including possible attributes, in single quotation marks (' '). - `attribName`, `attribName1`: The names of optional attributes. - `attribValue`, `attribValue1`: The optional values of the attributes. If you don't specify a value, any value is accepted when searching for the comment in `filename`. Enclose the attribute value in quotation marks ("). -By using the `` tag, you can refer to comments in another file that describe the types and members in your source code. Including an external file is an alternative to placing documentation comments directly in your source code file. By putting the documentation in a separate file, you can apply source control to the documentation separately from the source code. One person can have the source code file checked out and someone else can have the documentation file checked out. The `` tag uses the XML XPath syntax. Refer to XPath documentation for ways to customize your `` use. +By using the `` tag, you can refer to comments in another file that describe the types and members in your source code. Including an external file is an alternative to placing documentation comments directly in your source code file. By putting the documentation in a separate file, you can apply source control to the documentation separately from the source code. One person can check out the source code file and someone else can check out the documentation file. The `` tag uses the XML XPath syntax. Refer to XPath documentation for ways to customize your `` use. For example, the following source code uses the `` tag to include remarks. The file path is relative to the source. diff --git a/docs/csharp/misc/cs0061.md b/docs/csharp/misc/cs0061.md index eb91fa3a49c04..80560be48520c 100644 --- a/docs/csharp/misc/cs0061.md +++ b/docs/csharp/misc/cs0061.md @@ -14,7 +14,7 @@ Inconsistent accessibility: base interface 'interface 1' is less accessible than A [public](../language-reference/keywords/public.md) construct must return a publicly accessible object. - Interface accessibility cannot be narrowed in a derived interface. For more information, see [Interfaces](../fundamentals/types/interfaces.md) and [Access Modifiers](../programming-guide/classes-and-structs/access-modifiers.md). + Interface accessibility cannot be widened in a derived interface. For more information, see [Interfaces](../fundamentals/types/interfaces.md) and [Access Modifiers](../programming-guide/classes-and-structs/access-modifiers.md). The following sample generates CS0061. diff --git a/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md b/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md index b99526fdabc49..9a7546fc25cb6 100644 --- a/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md +++ b/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md @@ -64,8 +64,6 @@ f1_keywords: - "CS7030" - "CS7032" - "CS7033" - - "CS7034" - - "CS7035" - "CS7041" - "CS7042" - "CS7043" @@ -160,17 +158,9 @@ f1_keywords: - "CS8113" # C# 7.0 diagnostics - "CS8115" - - "CS8123" - - "CS8126" - - "CS8128" - "CS8134" - - "CS8135" - "CS8136" - - "CS8137" - - "CS8138" - - "CS8179" - "CS8180" - - "CS8182" - "CS8183" - "CS8184" - "CS8185" @@ -190,7 +180,6 @@ f1_keywords: - "CS8300" - "CS8301" - "CS8305" - - "CS8307" - "CS8308" - "CS8309" - "CS8310" @@ -214,8 +203,6 @@ f1_keywords: # C# 7.3 diagnostics - "CS8378" - "CS8381" - - "CS8383" - - "CS8384" # Coming in C# 15 - "CS9343" # misc - "CS9347" diff --git a/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md b/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md index 1a489fef37c87..e1514a1116db6 100644 --- a/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md +++ b/docs/csharp/programming-guide/classes-and-structs/partial-classes-and-methods.md @@ -147,7 +147,7 @@ partial void OnNameChanged() ## C# Language Specification -For more information, see [Partial types](~/_csharpstandard/standard/classes.md#1527-partial-type-declarations) and [Partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. The new features for partial members are defined in the feature specifications for [extending partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods), [partial properties and indexers](~/_csharplang/proposals/csharp-13.0/partial-properties.md), and [partial events and constructors](~/_csharplang/proposals/csharp-14.0/partial-events-and-constructors.md). +For more information, see [Partial types](~/_csharpstandard/standard/classes.md#1527-partial-type-declarations) and [Partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods) in the [C# Language Specification](~/_csharpstandard/standard/README.md). The language specification is the definitive source for C# syntax and usage. The standard defines [extending partial methods](~/_csharpstandard/standard/classes.md#1569-partial-methods), [partial properties](~/_csharpstandard/standard/classes.md#1577-partial-properties), and [partial indexers](~/_csharpstandard/standard/classes.md#1593-partial-indexers). The [partial events and constructors](~/_csharplang/proposals/csharp-14.0/partial-events-and-constructors.md) feature specification defines later partial members. ## See also diff --git a/docs/csharp/specification/overview.md b/docs/csharp/specification/overview.md index d1fce19f74f10..21b737c803650 100644 --- a/docs/csharp/specification/overview.md +++ b/docs/csharp/specification/overview.md @@ -1,13 +1,13 @@ --- title: "Standard specification" description: "Understand the relationships among the ECMA C# standard and the working draft." -ms.date: 08/12/2026 +ms.date: 08/19/2026 --- # C# standard specification The [C# language specification](~/_csharpstandard/standard/README.md) is the definitive source for the C# language. The [ECMA C# standard committee (TC49-TG2)](https://www.ecma-international.org/task-groups/tc49-tg2/) produces the specification. The committee is currently finalizing version 8 of the standard. -The draft published here is a feature complete early draft of C# 12 based on the committee's initial work. The committee uses [Microsoft specifications](https://github.com/dotnet/csharplang/tree/main/proposals) and [language design meeting (LDM) notes](https://github.com/dotnet/csharplang/tree/main/meetings) to produce the specification. These early drafts haven't been reviewed or adopted by the committee yet. +The draft published here is a feature complete early draft of C# 13 based on the committee's initial work. The committee uses [Microsoft specifications](https://github.com/dotnet/csharplang/tree/main/proposals) and [language design meeting (LDM) notes](https://github.com/dotnet/csharplang/tree/main/meetings) to produce the specification. These early drafts haven't been reviewed or adopted by the committee yet. This section contains a working draft of the [C# language specification](~/_csharpstandard/standard/README.md). The committee works in the [dotnet/csharpstandard](https://github.com/dotnet/csharpstandard) repository. You can track the committee's progress and participate in the standard work there. diff --git a/docs/csharp/specification/toc.yml b/docs/csharp/specification/toc.yml index e18aa4985beca..3c2458226aca4 100644 --- a/docs/csharp/specification/toc.yml +++ b/docs/csharp/specification/toc.yml @@ -1,7 +1,7 @@ items: - name: C# specifications href: index.yml -- name: C# 11 early draft specification +- name: C# 13 early draft specification items: - name: Overview href: overview.md @@ -77,8 +77,6 @@ items: displayName: feature specifications - name: Lexical structure items: - - name: "Escape sequence '\\e'" - href: ../../../_csharplang/proposals/csharp-13.0/esc-escape-sequence.md - name: "Ignored directives" href: ../../../_csharplang/proposals/csharp-14.0/ignored-directives.md - name: Types @@ -91,40 +89,26 @@ items: href: ../../../_csharplang/proposals/csharp-14.0/first-class-span-types.md - name: Expressions items: - - name: Better conversion from collection expression - href: ../../../_csharplang/proposals/csharp-13.0/collection-expressions-better-conversion.md - name: Collection expression arguments href: ../../../_csharplang/proposals/csharp-15.0/collection-expression-arguments.md - - name: Method group natural type conversion - href: ../../../_csharplang/proposals/csharp-13.0/method-group-natural-type-improvements.md - name: Simple lambda parameters with modifiers href: ../../../_csharplang/proposals/csharp-14.0/simple-lambda-parameters-with-modifiers.md - name: Unbound generic types in nameof href: ../../../_csharplang/proposals/csharp-14.0/unbound-generic-types-in-nameof.md - - name: Overload resolution priority - href: ../../../_csharplang/proposals/csharp-13.0/overload-resolution-priority.md - name: Null conditional assignment href: ../../../_csharplang/proposals/csharp-14.0/null-conditional-assignment.md - name: User defined compound assignment operators href: ../../../_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md - name: Statements items: - - name: Lock object semantics - href: ../../../_csharplang/proposals/csharp-13.0/lock-object.md - - name: Allow `ref` and `unsafe` - href: ../../../_csharplang/proposals/csharp-13.0/ref-unsafe-in-iterators-async.md - name: Labeled `break` and `continue` href: ../../../_csharplang/proposals/csharp-15.0/labeled-break-continue.md - name: Classes items: - - name: Partial properties - href: ../../../_csharplang/proposals/csharp-13.0/partial-properties.md - name: Partial events and constructors href: ../../../_csharplang/proposals/csharp-14.0/partial-events-and-constructors.md - name: Field backed properties href: ../../../_csharplang/proposals/csharp-14.0/field-keyword.md - - name: Params collections - href: ../../../_csharplang/proposals/csharp-13.0/params-collections.md - name: Extension members href: ../../../_csharplang/proposals/csharp-14.0/extensions.md - name: Extension operators @@ -137,10 +121,6 @@ items: items: - name: Union types href: ../../../_csharplang/proposals/csharp-15.0/unions.md - - name: Interfaces - items: - - name: Allow ref struct interfaces - href: ../../../_csharplang/proposals/csharp-13.0/ref-struct-interfaces.md - name: Unsafe code items: - name: Memory safety diff --git a/docs/csharp/toc.yml b/docs/csharp/toc.yml index 5284db7e654c5..3e5ee8035ff78 100644 --- a/docs/csharp/toc.yml +++ b/docs/csharp/toc.yml @@ -115,6 +115,8 @@ items: href: fundamentals/tutorials/string-interpolation.md - name: Expressions and statements items: + - name: Expressions overview + href: fundamentals/expressions/index.md - name: Equality href: fundamentals/expressions/equality.md - name: Selection statements diff --git a/docs/csharp/whats-new/csharp-13.md b/docs/csharp/whats-new/csharp-13.md index a20f97a3b31ed..9c0df44c9594f 100644 --- a/docs/csharp/whats-new/csharp-13.md +++ b/docs/csharp/whats-new/csharp-13.md @@ -33,7 +33,7 @@ You can find any breaking changes introduced in C# 13 in our article on [breakin The `params` modifier isn't limited to array types. You can now use `params` with any recognized collection type, including , , and types that implement and have an `Add` method. In addition to concrete types, the interfaces , , , , and can also be used. -When an interface type is used, the compiler synthesizes the storage for the arguments supplied. You can learn more in the feature specification for [`params` collections](~/_csharplang/proposals/csharp-13.0/params-collections.md). +When an interface type is used, the compiler synthesizes the storage for the arguments supplied. You can learn more in the C# language specification for [`params` collections](~/_csharpstandard/standard/classes.md#15624-parameter-collections). For example, method declarations can declare spans as `params` parameters: @@ -53,7 +53,7 @@ public void Concat(params ReadOnlySpan items) The .NET 9 runtime includes a new type for thread synchronization, the type. This type provides better thread synchronization through its API. The method enters an exclusive scope. The `ref struct` returned from that supports the `Dispose()` pattern to exit the exclusive scope. -The C# [`lock`](../language-reference/statements/lock.md) statement recognizes if the target of the lock is a `Lock` object. If so, it uses the updated API, rather than the traditional API using . The compiler also recognizes if you convert a `Lock` object to another type and the `Monitor` based code would be generated. You can read more in the feature specification for the [new lock object](~/_csharplang/proposals/csharp-13.0/lock-object.md). +The C# [`lock`](../language-reference/statements/lock.md) statement recognizes if the target of the lock is a `Lock` object. If so, it uses the updated API, rather than the traditional API using . The compiler also recognizes if you convert a `Lock` object to another type and the `Monitor` based code would be generated. You can read more in the C# language specification for the [new lock object](~/_csharpstandard/standard/statements.md#1313-the-lock-statement). This feature allows you to get the benefits of the new library type by changing the type of object you `lock`. No other code needs to change. @@ -67,7 +67,7 @@ This feature makes small optimizations to overload resolution involving method g The new behavior is to prune the set of candidate methods at each scope, removing those candidate methods that aren't applicable. Typically, the removed methods are generic methods with the wrong arity, or constraints that aren't satisfied. The process continues to the next outer scope only if no candidate methods are found. This process more closely follows the general algorithm for overload resolution. If all candidate methods found at a given scope don't match, the method group doesn't have a natural type. -You can read the details of the changes in the [proposal specification](~/_csharplang/proposals/csharp-13.0/method-group-natural-type-improvements.md). +You can read the details of the changes in the [anonymous function type](~/_csharpstandard/standard/expressions.md#12228-anonymous-function-type) clause of the C# language specification. ## Implicit index access diff --git a/docs/csharp/whats-new/csharp-15.md b/docs/csharp/whats-new/csharp-15.md index 8ae50a056da7d..c0c05f4e7763b 100644 --- a/docs/csharp/whats-new/csharp-15.md +++ b/docs/csharp/whats-new/csharp-15.md @@ -1,7 +1,7 @@ --- title: What's new in C# 15 description: "Discover what's new in C# 15, including features such as union types, the closed modifier, extension indexers, and pointer relaxations. Try examples in your code." -ms.date: 07/08/2026 +ms.date: 08/14/2026 ms.topic: whats-new ms.update-cycle: 365-days ai-usage: ai-assisted @@ -98,17 +98,7 @@ string Describe(GateState state) => state switch The `closed` modifier is a contextual keyword. A `closed` class is implicitly `abstract` and can't be combined with `sealed`, `static`, or an explicit `abstract` modifier. Derivation isn't transitive: a non-closed descendant of a closed class can still be derived from in other assemblies. To extend exhaustiveness checking down the hierarchy, mark intermediate descendants `closed` as well. -> [!NOTE] -> In C# 15 preview 5, the runtime doesn't yet ship `System.Runtime.CompilerServices.ClosedAttribute`. Until it does, every project that uses the `closed` modifier must declare the attribute itself: -> -> ```csharp -> namespace System.Runtime.CompilerServices; -> -> [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] -> public sealed class ClosedAttribute : Attribute { } -> ``` - -For more information, see the [closed modifier](../language-reference/keywords/closed.md) and [Closed hierarchy patterns](../language-reference/operators/patterns.md#closed-hierarchy-patterns) in the language reference, or the [feature specification](~/_csharplang/proposals/csharp-15.0/closed-hierarchies.md). You can copy the examples in this section, including the `ClosedAttribute` workaround, from the [keywords snippets project](https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/keywords/snippets/shared) in the `dotnet/docs` GitHub repository. +For more information, see the [closed modifier](../language-reference/keywords/closed.md) and [Closed hierarchy patterns](../language-reference/operators/patterns.md#closed-hierarchy-patterns) in the language reference, or the [feature specification](~/_csharplang/proposals/csharp-15.0/closed-hierarchies.md). ## Extension indexers @@ -159,7 +149,7 @@ outer: for (int row = 0; row < grid.Height; row++) } ``` -The label is placed directly on the loop or `switch` statement it identifies. Without a label, `break` and `continue` keep their original behavior and target the innermost applicable statement. +Place the label directly on the loop or `switch` statement it identifies. Without a label, `break` and `continue` keep their original behavior and target the innermost applicable statement. The [IDE0410](../../fundamentals/code-analysis/style-rules/ide0410.md) style rule flags the Boolean flag and `goto` patterns that a labeled jump statement can replace, and shows before-and-after examples of each. @@ -193,7 +183,26 @@ fixed (int* first = numbers) The operations that access the pointed-to memory, such as pointer indirection (`*p`), pointer member access (`p->member`), pointer element access (`p[i]`), and function pointer invocation, still require an `unsafe` context. -The *requires-unsafe* member model, the assembly opt-in to the updated memory safety rules, and the `safe` contextual keyword come in a later preview. +C# 15 also adds an `unsafe` expression, `unsafe(expression)`, that establishes an unsafe context for a single expression. It's useful where an `unsafe` block can't appear syntactically, such as a field initializer, a constructor initializer, or a `catch` filter: + +```csharp +class Header +{ + // A field initializer can't contain an unsafe block, but it can contain an unsafe expression. + static readonly int Signature = unsafe(ReadSignature()); + + static unsafe int ReadSignature() + { + int rawValue = 0x1234; + int* pointer = &rawValue; + return *pointer; + } +} +``` + +Like the rest of the memory safety preview, `unsafe` expressions require the `preview` language version and the `AllowUnsafeBlocks` compiler option. + +The compiler also recognizes the `safe` contextual keyword as a modifier on `extern` members and explicit-layout fields. However, the *requires-unsafe* member model and the assembly opt-in to the updated memory safety rules aren't available yet, so `safe` and `unsafe` currently have no effect on callers. For more information, see [Unsafe code, pointer types, and function pointers](../language-reference/unsafe-code.md#the-updated-memory-safety-model-preview) in the language reference or the [feature specification](~/_csharplang/proposals/unsafe-evolution.md). diff --git a/docs/fundamentals/index.yml b/docs/fundamentals/index.yml index ad479585c2f9d..6d4e4b4989323 100644 --- a/docs/fundamentals/index.yml +++ b/docs/fundamentals/index.yml @@ -94,7 +94,7 @@ landingContent: - linkListType: concept links: - text: Port from .NET Framework to .NET - url: ../core/porting/index.md + url: ../core/porting/framework-overview.md - linkListType: deploy links: - text: App publishing diff --git a/docs/fundamentals/networking/websockets.md b/docs/fundamentals/networking/websockets.md index 598e23f168a12..d84eedaa18067 100644 --- a/docs/fundamentals/networking/websockets.md +++ b/docs/fundamentals/networking/websockets.md @@ -14,11 +14,18 @@ The WebSocket protocol enables two-way communication between a client and a remo WebSockets over HTTP/1.1 uses a single TCP connection, therefore it is managed by connection-wide headers, for more information, see [RFC 6455](https://www.rfc-editor.org/rfc/rfc6455). Consider the following example of how to establish WebSocket over HTTP/1.1: ```c# +using System.Net.WebSockets; +using System.Text; + Uri uri = new("ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx"); using ClientWebSocket ws = new(); await ws.ConnectAsync(uri, default); +string message = "Hello, WebSocket!"; +var messageBytes = Encoding.UTF8.GetBytes(message); +await ws.SendAsync(messageBytes, WebSocketMessageType.Text, true, default); + var bytes = new byte[1024]; var result = await ws.ReceiveAsync(bytes, default); string res = Encoding.UTF8.GetString(bytes, 0, result.Count); diff --git a/docs/index.yml b/docs/index.yml index 48d23ff62d6de..7007df99da993 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -151,7 +151,7 @@ conceptualContent: # Card - title: Migrate and upgrade links: - - url: core/porting/index.md + - url: core/porting/framework-overview.md itemType: overview text: Port from .NET Framework to .NET - url: core/compatibility/breaking-changes.md diff --git a/docs/navigate/migration-guide/toc.yml b/docs/navigate/migration-guide/toc.yml index 5e469d8e36f14..ea4f28a43456c 100644 --- a/docs/navigate/migration-guide/toc.yml +++ b/docs/navigate/migration-guide/toc.yml @@ -79,9 +79,7 @@ items: - name: Unavailable technologies href: ../../core/porting/net-framework-tech-unavailable.md - name: Unsupported APIs - items: - - name: Unsupported API list - href: ../../core/compatibility/unsupported-apis.md + href: ../../core/compatibility/unsupported-apis.md - name: Needed changes before porting code href: ../../core/porting/premigration-needed-changes.md - name: Upgrade diff --git a/docs/orleans/Directory.Build.props b/docs/orleans/Directory.Build.props index 1f6d6ed0b5d45..9a70bee63fffd 100644 --- a/docs/orleans/Directory.Build.props +++ b/docs/orleans/Directory.Build.props @@ -17,7 +17,7 @@ - - + + diff --git a/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj b/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj index d438604e3ed0f..ca242f7413670 100644 --- a/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj +++ b/docs/orleans/grains/snippets/transactions/Abstractions/Abstractions.csproj @@ -2,7 +2,7 @@ - + diff --git a/docs/orleans/grains/snippets/transactions/Client/Client.csproj b/docs/orleans/grains/snippets/transactions/Client/Client.csproj index 7330533ada94d..5783b79af8690 100644 --- a/docs/orleans/grains/snippets/transactions/Client/Client.csproj +++ b/docs/orleans/grains/snippets/transactions/Client/Client.csproj @@ -6,7 +6,7 @@ - + diff --git a/docs/orleans/grains/snippets/transactions/Server/Server.csproj b/docs/orleans/grains/snippets/transactions/Server/Server.csproj index 2a5c055e41325..67d6ba4f8eb68 100644 --- a/docs/orleans/grains/snippets/transactions/Server/Server.csproj +++ b/docs/orleans/grains/snippets/transactions/Server/Server.csproj @@ -6,7 +6,7 @@ - + diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj index 4f1509f6ac317..bda4c4d93df8c 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj @@ -5,7 +5,7 @@ - + diff --git a/docs/standard/choosing-core-framework-server.md b/docs/standard/choosing-core-framework-server.md index edee0a290868a..14e479e55294f 100644 --- a/docs/standard/choosing-core-framework-server.md +++ b/docs/standard/choosing-core-framework-server.md @@ -84,7 +84,7 @@ As previously mentioned, the *.NET* implementation offers significant benefits f - [ASP.NET Core targeting .NET Framework](/aspnet/core/introduction-to-aspnet-core?view=aspnetcore-2.2&preserve-view=true#aspnet-core-targeting-net-framework) - [Target frameworks](frameworks.md) - [.NET introduction](../core/introduction.md) -- [Porting from .NET Framework to .NET 5](../core/porting/index.md) +- [Port from .NET Framework to .NET](../core/porting/framework-overview.md) - [Introduction to .NET and Docker](../core/docker/introduction.md) - [.NET implementations](../fundamentals/implementations.md) - [.NET Microservices. Architecture for Containerized .NET Applications](../architecture/microservices/index.md) diff --git a/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj b/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj index 85f203a889257..f829b70747779 100644 --- a/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj +++ b/samples/snippets/core/testing/unit-testing-vb-nunit/vb/PrimeService.Tests/PrimeService.Tests.vbproj @@ -10,7 +10,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj b/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj +++ b/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj b/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj +++ b/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj b/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj +++ b/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj b/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj +++ b/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj b/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj +++ b/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj b/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj +++ b/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj b/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj index d2f4e0afdadb6..466b49e859ac8 100644 --- a/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj +++ b/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj b/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj +++ b/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj b/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj +++ b/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj b/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj +++ b/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj b/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj index 1d4a55d821c78..05f3c4eabc8d2 100644 --- a/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj +++ b/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj b/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj index bd486ed1133ee..3ab50a2b87755 100644 --- a/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj +++ b/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj @@ -7,9 +7,9 @@ - + - + diff --git a/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj b/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj +++ b/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj b/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj +++ b/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj b/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj +++ b/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj b/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj +++ b/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj b/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj +++ b/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj b/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj index dce80cad9368f..c8c0eadc9ad50 100644 --- a/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj +++ b/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj b/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj index cf49a4887fb8c..0275b7b581a02 100644 --- a/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj +++ b/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj b/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj index 17a52de20cc18..29b4d5ba1f106 100644 --- a/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj +++ b/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj b/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj index 60321cd279c67..74b62f7627a81 100644 --- a/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj +++ b/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj @@ -7,7 +7,7 @@ - +