diff --git a/.gitignore b/.gitignore index fa3c66151b310..aebb12d48e08f 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ ehthumbs_vista.db [Bb]in/ [Oo]bj/ *.sln +*.slnx *.user # Ionide folder, used in F# for VSCode diff --git a/docs/ai/quickstarts/build-mcp-server.md b/docs/ai/quickstarts/build-mcp-server.md index 85c8f4fa74f7f..fd38d842aa99a 100644 --- a/docs/ai/quickstarts/build-mcp-server.md +++ b/docs/ai/quickstarts/build-mcp-server.md @@ -12,7 +12,7 @@ ms.author: alexwolf In this quickstart, you create a minimal Model Context Protocol (MCP) server using the [C# SDK for MCP](https://github.com/modelcontextprotocol/csharp-sdk), connect to it using GitHub Copilot, and publish it to NuGet. MCP servers are services that expose capabilities to clients through the Model Context Protocol (MCP). > [!NOTE] -> The `Microsoft.Extensions.AI.Templates` experience is currently in preview. The template uses the [ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol/) library and the [MCP registry `server.json` schema](https://github.com/modelcontextprotocol/registry/blob/main/docs/server-json/README.md), which are both in preview. +> The `Microsoft.Extensions.AI.Templates` experience is currently in preview. The template uses the [ModelContextProtocol](https://www.nuget.org/packages/ModelContextProtocol/) library and the [MCP registry `server.json` schema](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/generic-server-json.md), which are both in preview. ## Prerequisites @@ -140,11 +140,11 @@ In this example, you enhance the MCP server to use a configuration value set in VS Code should return a random weather description. -1. Update the `.mcp/server.json` to declare your environment variable input. The `server.json` file schema is defined by the [MCP Registry project](https://github.com/modelcontextprotocol/registry/blob/main/docs/server-json/README.md) and is used by NuGet.org to generate VS Code MCP configuration. +1. Update the `.mcp/server.json` to declare your environment variable input. The `server.json` file schema is defined by the [MCP Registry project](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/generic-server-json.md) and is used by NuGet.org to generate VS Code MCP configuration. - * Use the `environment_variables` property to declare environment variables used by your app that will be set by the client using the MCP server (for example, VS Code). + - Use the `environment_variables` property to declare environment variables used by your app that will be set by the client using the MCP server (for example, VS Code). - * Use the `package_arguments` property to define CLI arguments that will be passed to your app. For more examples, see the [MCP Registry project](https://github.com/modelcontextprotocol/registry/blob/main/docs/server-json/examples.md). + - Use the `package_arguments` property to define CLI arguments that will be passed to your app. For more examples, see the [MCP Registry project](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/generic-server-json.md#examples). :::code language="json" source="snippets/mcp-server/.mcp/server.json"::: @@ -231,15 +231,15 @@ For more information, see [Publish a package](/nuget/nuget-org/publish-a-package ## Common issues -### The command "dnx" needed to run SampleMcpServer was not found. +### The command "dnx" needed to run SampleMcpServer was not found If VS Code shows this error when starting the MCP server, you need to install a compatible version of the .NET SDK. :::image type="content" source="../media/mcp/missing-dnx.png" alt-text="A screenshot showing the missing dnx command in VS Code."::: -The `dnx` command is shipped as part of the .NET SDK, starting with version 10 preview 6. [Install the .NET 10 SDK](https://dotnet.microsoft.com/download/dotnet) to resolve this issue. +The `dnx` command is shipped as part of the .NET SDK, starting with version 10. [Install the .NET 10 SDK](https://dotnet.microsoft.com/download/dotnet) to resolve this issue. -### GitHub Copilot does not use your tool (an answer is provided without invoking your tool). +### GitHub Copilot doesn't use your tool (an answer is provided without invoking your tool) Generally speaking, an AI agent like GitHub Copilot is informed that it has some tools available by the client application, such as VS Code. Some tools, such as the sample random number tool, might not be leveraged by the AI agent because it has similar functionality built in. diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-model-layer-validations.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-model-layer-validations.md index e6c0a83cb62ed..dd994461978f7 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-model-layer-validations.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/domain-model-layer-validations.md @@ -92,7 +92,7 @@ Using field validation with data annotations, for example, you do not duplicate - **Specification and Notification Patterns** \ - + - **Lev Gorodinski. Validation in Domain-Driven Design (DDD)** \ diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index d1808dbb01d8b..4e4503e8ac5cc 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -109,14 +109,14 @@ | Synapse - Monitoring | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Analytics.Synapse.Monitoring/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Monitoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Monitoring_1.0.0-beta.3/sdk/synapse/Azure.Analytics.Synapse.Monitoring/) | | Synapse - Spark | NuGet [1.0.0-preview.8](https://www.nuget.org/packages/Azure.Analytics.Synapse.Spark/1.0.0-preview.8) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Spark-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Spark_1.0.0-preview.8/sdk/synapse/Azure.Analytics.Synapse.Spark/) | | System Events | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.EventGrid.SystemEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid.SystemEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid.SystemEvents_1.0.0/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/) | -| System.ClientModel | NuGet [1.6.1](https://www.nuget.org/packages/System.ClientModel/1.6.1) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.6.1](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.6.1/sdk/core/System.ClientModel/) | +| System.ClientModel | NuGet [1.7.0](https://www.nuget.org/packages/System.ClientModel/1.7.0) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.7.0](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.7.0/sdk/core/System.ClientModel/) | | Tables | NuGet [12.11.0](https://www.nuget.org/packages/Azure.Data.Tables/12.11.0) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.11.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.11.0/sdk/tables/Azure.Data.Tables/) | | Text Analytics | NuGet [5.3.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0/sdk/textanalytics/Azure.AI.TextAnalytics/) | | Text Authoring | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Text.Authoring/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Text.Authoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text.Authoring_1.0.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/) | | Text Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Text/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Text-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Text_1.0.0/sdk/translation/Azure.AI.Translation.Text/) | | Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/IoT.TimeSeriesInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.TimeSeriesInsights_1.0.0-beta.1/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/) | | TimeZone | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.TimeZones/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.TimeZones-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.TimeZones_1.0.0-beta.1/sdk/maps/Azure.Maps.TimeZones/) | -| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.1/sdk/ai/Azure.AI.VoiceLive/) | +| unknown | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.2/sdk/ai/Azure.AI.VoiceLive/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.OnlineExperimentation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.OnlineExperimentation_1.0.0-beta.1/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects.AI/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects.AI-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects.AI_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects.AI/) | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 0724818b9c8e8..66d3a29a77d9f 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -116,14 +116,14 @@ | Synapse - Monitoring | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Analytics.Synapse.Monitoring/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Monitoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Monitoring_1.0.0-beta.3/sdk/synapse/Azure.Analytics.Synapse.Monitoring/) | | Synapse - Spark | NuGet [1.0.0-preview.8](https://www.nuget.org/packages/Azure.Analytics.Synapse.Spark/1.0.0-preview.8) | [docs](/dotnet/api/overview/azure/Analytics.Synapse.Spark-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-preview.8](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.Synapse.Spark_1.0.0-preview.8/sdk/synapse/Azure.Analytics.Synapse.Spark/) | | System Events | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.EventGrid.SystemEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.EventGrid.SystemEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.EventGrid.SystemEvents_1.0.0/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/) | -| System.ClientModel | NuGet [1.6.1](https://www.nuget.org/packages/System.ClientModel/1.6.1) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.6.1](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.6.1/sdk/core/System.ClientModel/) | +| System.ClientModel | NuGet [1.7.0](https://www.nuget.org/packages/System.ClientModel/1.7.0) | [docs](/dotnet/api/overview/azure/System.ClientModel-readme) | GitHub [1.7.0](https://github.com/Azure/azure-sdk-for-net/tree/System.ClientModel_1.7.0/sdk/core/System.ClientModel/) | | Tables | NuGet [12.11.0](https://www.nuget.org/packages/Azure.Data.Tables/12.11.0) | [docs](/dotnet/api/overview/azure/Data.Tables-readme) | GitHub [12.11.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.Tables_12.11.0/sdk/tables/Azure.Data.Tables/) | | Text Analytics | NuGet [5.3.0](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.3.0) | [docs](/dotnet/api/overview/azure/AI.TextAnalytics-readme) | GitHub [5.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.TextAnalytics_5.3.0/sdk/textanalytics/Azure.AI.TextAnalytics/) | | Text Authoring | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Text.Authoring/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Text.Authoring-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text.Authoring_1.0.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/) | | Text Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Text/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Text-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Text_1.0.0/sdk/translation/Azure.AI.Translation.Text/) | | Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/IoT.TimeSeriesInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.TimeSeriesInsights_1.0.0-beta.1/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/) | | TimeZone | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.TimeZones/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.TimeZones-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.TimeZones_1.0.0-beta.1/sdk/maps/Azure.Maps.TimeZones/) | -| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.1/sdk/ai/Azure.AI.VoiceLive/) | +| unknown | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.2/sdk/ai/Azure.AI.VoiceLive/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.OnlineExperimentation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.OnlineExperimentation_1.0.0-beta.1/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects.AI/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects.AI-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects.AI_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects.AI/) | diff --git a/docs/azure/migration/appmod/containerization.md b/docs/azure/migration/appmod/containerization.md new file mode 100644 index 0000000000000..e6dcefcc6a0b7 --- /dev/null +++ b/docs/azure/migration/appmod/containerization.md @@ -0,0 +1,64 @@ +--- +title: Containerize your project using GitHub Copilot app modernization for .NET +description: Learn how to containerize your .NET project using GitHub Copilot app modernization for .NET. +#customer intent: As a .NET developer, I want to containerize my project using GitHub Copilot App Modernization so that I can modernize my application efficiently. +ms.topic: quickstart +ms.custom: devx-track-dotnet +ms.date: 09/17/2025 +author: JiDong +ms.author: donji +--- + +# Quickstart: Containerize your project using GitHub Copilot app modernization for .NET + +In this quickstart, you learn how to containerize your project using GitHub Copilot app modernization for .NET. The app modernization tooling uses GitHub Copilot's AI capabilities to: + +- Analyze your project structure and dependencies +- Generate Dockerfile configurations +- Create build-ready Docker images +- Guide you through the containerization process + +## Prerequisites + +Before you begin, make sure you have: + +- Windows operating system +- [Visual Studio 2022 version 17.14.16 or newer](https://visualstudio.microsoft.com/downloads/) +- [.NET desktop development workload](/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#change-workloads-or-individual-components) with these optional components enabled: + - GitHub Copilot + - GitHub Copilot app modernization for .NET +- GitHub account with Copilot access and a supported subscription plan: + - [Sign in to Visual Studio using a GitHub account](/visualstudio/ide/work-with-github-accounts) with [Copilot access](https://docs.github.com/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot). + - Supported subscription plans: Copilot Pro, Copilot Pro+, Copilot Business, or Copilot Enterprise. + - If you change subscriptions, restart Visual Studio. + +## Containerize your project + +The GitHub Copilot app modernization for .NET containerization feature helps you containerize your project. To start the containerization process, complete the following steps: + +1. Open your project in Visual Studio. + +1. Start containerization by using one of these approaches: + + - **Containerize from Assessment Report**: In the assessment report, select **Run Task** for the Docker Containerization issue. + + :::image type="content" source="media/containerize-assessment-report.png" alt-text="Screenshot that shows containerization task in assessment report."::: + + - **Use a containerization prompt**: You can input the following prompt in Copilot chat to containerize your project: + + *Scan my project and help me plan how to containerize my application using the #appmod-get-containerization-plan tool. Execute the plan. The end goal is to have Dockerfiles that are able to be built.* + + :::image type="content" source="media/containerization-prompt.png" alt-text="Screenshot that shows how to start the containerization process in GitHub Copilot using a prompt."::: + +1. After you start the process, GitHub Copilot can ask for your approval to use tools or run commands. Grant permission when prompted. + +1. GitHub Copilot analyzes your project and generates a plan. The plan includes a breakdown of your project and steps for containerizing your project. + +1. GitHub Copilot follows the steps to generate a Dockerfile and validate that your Docker image builds successfully. + +1. When GitHub Copilot finishes containerizing your project, it provides a summary of what it did. + +## Notes + +- Use Claude Sonnet 4 or later models for the best results. +- Copilot might take a few iterations to fix containerization errors. diff --git a/docs/azure/migration/appmod/deploy.md b/docs/azure/migration/appmod/deploy.md new file mode 100644 index 0000000000000..dc9c45ccd17f9 --- /dev/null +++ b/docs/azure/migration/appmod/deploy.md @@ -0,0 +1,60 @@ +--- +title: Deploy your project to Azure by using GitHub Copilot app modernization for .NET +description: Learn how to deploy your migrated .NET project to Azure by using GitHub Copilot app modernization for .NET. +ms.topic: quickstart +ms.custom: devx-track-dotnet +ms.date: 09/17/2025 +author: JiDong +ms.author: donji +--- + +# Deploy your project to Azure by using GitHub Copilot app modernization for .NET + +In this quickstart, you learn how to deploy your project to Azure with GitHub Copilot app modernization for .NET. This tool lets you deploy migrated projects to Azure and automatically fixes deployment errors during the process. + +## Prerequisites + +- Windows operating system +- [Visual Studio 2022 version 17.14.16 or newer](https://visualstudio.microsoft.com/downloads/) +- [.NET desktop development workload](/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#change-workloads-or-individual-components) with these optional components enabled: + - GitHub Copilot + - GitHub Copilot app modernization for .NET +- GitHub account with Copilot access and a supported subscription plan: + - [Sign in to Visual Studio using a GitHub account](/visualstudio/ide/work-with-github-accounts) with [Copilot access](https://docs.github.com/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot). + - Supported subscription plans: Copilot Pro, Copilot Pro+, Copilot Business, or Copilot Enterprise. + - If you change subscriptions, restart Visual Studio. + +## Deploy your project + +The App Modernization for .NET deployment feature helps you deploy your migrated app to Azure. Follow these steps to start the deployment process: + +1. In Visual Studio, open your migrated project. + +1. Start the deployment with one of the following approaches: + + - **Deploy after migration**: Deploy your project after completing your migration task. GitHub Copilot asks if you'd like to deploy your project to Azure upon completing a migration task. Instructing Copilot to continue starts the deployment process. + + :::image type="content" source="media/start-deploy.png" alt-text="Screenshot that shows how to start the deployment process in GitHub Copilot."::: + + - **Use a deployment prompt**: You can enter the following prompt in Copilot chat to deploy your project to Azure: + + *Scan my project to identify all Azure-relevant resources, programming languages, frameworks, dependencies, and configuration files needed for deployment, and develop an architecture diagram for me using #appmod-generate-architecture-diagram. Based on that diagram, help me develop and execute a plan using #appmod-get-plan to deploy my project to Azure. deployTool: azcli, hosting service: non-aks.* + + :::image type="content" source="media/start-deploy-prompt.png" alt-text="Screenshot that shows how to start the deployment process in GitHub Copilot by using a prompt."::: + +1. After you start the deployment, GitHub Copilot might ask for your approval to use tools or run commands. Grant permission when prompted. + +1. GitHub Copilot creates a plan. The plan explains the deployment strategy, including deployment goals, project information, Azure resource architecture, Azure resources, and execution steps. + +1. You can edit the plan directly or ask GitHub Copilot to edit it to customize your deployment before you proceed. + +1. When you're satisfied with the plan, instruct GitHub Copilot to continue. + +1. GitHub Copilot follows the plan and runs the deployment process. + +1. When deployment finishes, GitHub Copilot provides a summary of the deployment process. + +## Notes + +- Use Claude Sonnet 4 or later models for the best results. +- Copilot can need a few iterations to fix deployment errors. diff --git a/docs/azure/migration/appmod/faq.md b/docs/azure/migration/appmod/faq.md index 36825cd0aa8fa..3c6b5ef300864 100644 --- a/docs/azure/migration/appmod/faq.md +++ b/docs/azure/migration/appmod/faq.md @@ -122,14 +122,17 @@ If Visual Studio fails to automatically upgrade AppCAT when a new version is ava ## What should I do if I see "Command failed: No .NET SDKs were found" errors? -This error occurs when AppCAT cannot find a compatible .NET SDK, even if you have other .NET SDKs installed. AppCAT requires the .NET 8.0 SDK to run properly. +This error occurs when AppCAT cannot find a compatible .NET SDK, even if you have other .NET SDKs installed. AppCAT requires the .NET 9.0 SDK to run properly. To fix this error: -1. Download and install the .NET 8 SDK from . +1. Download and install the .NET 9.0 SDK from . 2. Restart Visual Studio. 3. Run the assessment again. +> [!NOTE] +> The GitHub Copilot app modernization for .NET extension can automatically help you install or upgrade to .NET 9. If you have an older version of the extension, update to the latest version for automatic installation assistance for the required .NET 9.0 SDK. + ## Does the tool store my source code? No. The tool uses GitHub Copilot in the same way you use it to modify code, and doesn't retain code snippets beyond the immediate session. Telemetry metrics are collected and analyzed to track feature usage and effectiveness. diff --git a/docs/azure/migration/appmod/media/assessment-in-process.png b/docs/azure/migration/appmod/media/assessment-in-process.png new file mode 100644 index 0000000000000..e7c34bdf54a5d Binary files /dev/null and b/docs/azure/migration/appmod/media/assessment-in-process.png differ diff --git a/docs/azure/migration/appmod/media/assessment-report.png b/docs/azure/migration/appmod/media/assessment-report.png new file mode 100644 index 0000000000000..abe533c2db362 Binary files /dev/null and b/docs/azure/migration/appmod/media/assessment-report.png differ diff --git a/docs/azure/migration/appmod/media/containerization-prompt.png b/docs/azure/migration/appmod/media/containerization-prompt.png new file mode 100644 index 0000000000000..1c9426efdc4b9 Binary files /dev/null and b/docs/azure/migration/appmod/media/containerization-prompt.png differ diff --git a/docs/azure/migration/appmod/media/containerize-assessment-report.png b/docs/azure/migration/appmod/media/containerize-assessment-report.png new file mode 100644 index 0000000000000..3b5f7c1505e3c Binary files /dev/null and b/docs/azure/migration/appmod/media/containerize-assessment-report.png differ diff --git a/docs/azure/migration/appmod/media/modernization-welcome.png b/docs/azure/migration/appmod/media/modernization-welcome.png new file mode 100644 index 0000000000000..13b6f2e72ceeb Binary files /dev/null and b/docs/azure/migration/appmod/media/modernization-welcome.png differ diff --git a/docs/azure/migration/appmod/media/modernize-solution.png b/docs/azure/migration/appmod/media/modernize-solution.png new file mode 100644 index 0000000000000..359d0f519614c Binary files /dev/null and b/docs/azure/migration/appmod/media/modernize-solution.png differ diff --git a/docs/azure/migration/appmod/media/overview-assessment.png b/docs/azure/migration/appmod/media/overview-assessment.png new file mode 100644 index 0000000000000..a8a0ebe1c5470 Binary files /dev/null and b/docs/azure/migration/appmod/media/overview-assessment.png differ diff --git a/docs/azure/migration/appmod/media/overview-remediation.png b/docs/azure/migration/appmod/media/overview-remediation.png new file mode 100644 index 0000000000000..3af602662b803 Binary files /dev/null and b/docs/azure/migration/appmod/media/overview-remediation.png differ diff --git a/docs/azure/migration/appmod/media/overview-solution.png b/docs/azure/migration/appmod/media/overview-solution.png new file mode 100644 index 0000000000000..a9f89b49c62ab Binary files /dev/null and b/docs/azure/migration/appmod/media/overview-solution.png differ diff --git a/docs/azure/migration/appmod/media/overview_assessment.png b/docs/azure/migration/appmod/media/overview_assessment.png deleted file mode 100644 index ad9a01a262b98..0000000000000 Binary files a/docs/azure/migration/appmod/media/overview_assessment.png and /dev/null differ diff --git a/docs/azure/migration/appmod/media/overview_remediation.png b/docs/azure/migration/appmod/media/overview_remediation.png deleted file mode 100644 index efa80a391779a..0000000000000 Binary files a/docs/azure/migration/appmod/media/overview_remediation.png and /dev/null differ diff --git a/docs/azure/migration/appmod/media/overview_solution.png b/docs/azure/migration/appmod/media/overview_solution.png deleted file mode 100644 index dcc7ef0ed6581..0000000000000 Binary files a/docs/azure/migration/appmod/media/overview_solution.png and /dev/null differ diff --git a/docs/azure/migration/appmod/media/quickstart-chat-experience.png b/docs/azure/migration/appmod/media/quickstart-chat-experience.png new file mode 100644 index 0000000000000..99b6d8cafabcc Binary files /dev/null and b/docs/azure/migration/appmod/media/quickstart-chat-experience.png differ diff --git a/docs/azure/migration/appmod/media/quickstart-followup.png b/docs/azure/migration/appmod/media/quickstart-followup.png new file mode 100644 index 0000000000000..c67f676fbb3a9 Binary files /dev/null and b/docs/azure/migration/appmod/media/quickstart-followup.png differ diff --git a/docs/azure/migration/appmod/media/start-deploy-prompt.png b/docs/azure/migration/appmod/media/start-deploy-prompt.png new file mode 100644 index 0000000000000..f2c80f91ee726 Binary files /dev/null and b/docs/azure/migration/appmod/media/start-deploy-prompt.png differ diff --git a/docs/azure/migration/appmod/media/start-deploy.png b/docs/azure/migration/appmod/media/start-deploy.png new file mode 100644 index 0000000000000..645526e14541e Binary files /dev/null and b/docs/azure/migration/appmod/media/start-deploy.png differ diff --git a/docs/azure/migration/appmod/overview.md b/docs/azure/migration/appmod/overview.md index f3fb6f0595c7a..aa358a626dd62 100644 --- a/docs/azure/migration/appmod/overview.md +++ b/docs/azure/migration/appmod/overview.md @@ -57,19 +57,19 @@ App Modernization for .NET (Preview) supports the following scenarios: Evaluates your application's readiness for Azure migration in Visual Studio, powered by [AppCAT for .NET](../appcat/install.md). - ![Assessment](media/overview_assessment.png) + ![Assessment](media/overview-assessment.png) - **Solution recommendations** Recommends target Azure services for your application's resource dependencies, tailored to each category of assessed issues. - ![Solution](media/overview_solution.png) + ![Solution](media/overview-solution.png) - **Code remediation for common issues** Accelerates code changes for [common modernization issues](predefined-tasks.md) by applying predefined tasks that represent expert best practices. - ![Apply Task](media/overview_remediation.png) + ![Apply Task](media/overview-remediation.png) - **Automatic fixes for compilation errors:** diff --git a/docs/azure/migration/appmod/predefined-tasks.md b/docs/azure/migration/appmod/predefined-tasks.md index acca8b870bb11..1f5cf06bfc4ef 100644 --- a/docs/azure/migration/appmod/predefined-tasks.md +++ b/docs/azure/migration/appmod/predefined-tasks.md @@ -3,7 +3,7 @@ title: Predefined tasks for GitHub Copilot app modernization for .NET (Preview) description: Learn about the predefined tasks that are available for GitHub Copilot app modernization for .NET ms.topic: concept-article ms.custom: devx-track-dotnet -ms.date: 7/15/2025 +ms.date: 9/17/2025 author: alexwolfmsft ms.author: alexwolf --- @@ -14,10 +14,13 @@ This article describes the predefined tasks available for GitHub Copilot app mod Predefined tasks capture industry best practices for using Azure services. Currently, App Modernization for .NET (Preview) offers predefined tasks that cover common migration scenarios. These tasks address the following subjects, and more: +- Database migration +- Storage migration - Secret management - Message queue integration -- Database migration +- Caching migration - Identity management +- Log management ## Predefined task list @@ -45,7 +48,7 @@ App Modernization for .NET currently supports the following predefined tasks: - **Migrate to Azure Service Bus** - Move from legacy or third-party message queues (such as MSMQ or RabbitMQ) to Azure Service Bus for reliable, cloud-based messaging. + Move from legacy or third-party message queues (such as MSMQ or RabbitMQ) or Amazon SQS (AWS Simple Queue Service) to Azure Service Bus for reliable, cloud-based messaging. - **Migrate to Azure Communication Service email** @@ -58,3 +61,7 @@ App Modernization for .NET currently supports the following predefined tasks: - **Migrate to OpenTelemetry on Azure** Transition from local logging frameworks like log4net, serilog, windows event log to OpenTelemetry on Azure. + +- **Migrate to Azure Cache for Redis** + + Replace in-memory or local Redis cache implementations with Azure Cache for Redis for high availability, scalability, and enterprise-grade security. diff --git a/docs/azure/migration/appmod/quickstart.md b/docs/azure/migration/appmod/quickstart.md index f0778334baa12..fae8a35d304ba 100644 --- a/docs/azure/migration/appmod/quickstart.md +++ b/docs/azure/migration/appmod/quickstart.md @@ -1,106 +1,93 @@ --- -title: GitHub Copilot app modernization for .NET (Preview) quickstart -description: Get started with GitHub Copilot app modernization for .NET -ms.topic: concept-article +title: Assess and migrate a .NET project with GitHub Copilot app modernization for .NET +ms.reviewer: alexwolf +description: Learn how to assess and migrate a .NET project by using GitHub Copilot app modernization for .NET. +ms.topic: quickstart ms.custom: devx-track-dotnet -ms.date: 7/15/2025 +ms.date: 09/22/2025 author: alexwolfmsft ms.author: alexwolf +#customer intent: As a .NET developer, I want to assess my project's migration readiness so that I can identify potential challenges and plan the modernization process effectively. --- -# Quickstart: Assess and migrate a .NET Project with GitHub Copilot app modernization for .NET (Preview) +# Quickstart: Assess and migrate a .NET project with GitHub Copilot app modernization for .NET -In this quickstart, you assess and migrate a .NET project using [GitHub Copilot app modernization for .NET (Preview)](https://aka.ms/appmod-dotnet-marketplace). You complete the following tasks: +In this quickstart, you assess and migrate a .NET project by using GitHub Copilot app modernization for .NET. You complete the following tasks: -- Install and configure the GitHub Copilot app modernization for .NET extension - Assess a sample project (Contoso University) - Start the migration process ## Prerequisites -Before you begin, ensure you have: +- Windows operating system +- [Visual Studio 2022 version 17.14.16 or newer](https://visualstudio.microsoft.com/downloads/) +- [.NET desktop development workload](/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#change-workloads-or-individual-components) with these optional components enabled: + - GitHub Copilot + - GitHub Copilot app modernization for .NET +- GitHub account with Copilot access and a supported subscription plan: + - [Sign in to Visual Studio using a GitHub account](/visualstudio/ide/work-with-github-accounts) with [Copilot access](https://docs.github.com/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot). + - Supported subscription plans: Copilot Pro, Copilot Pro+, Copilot Business, or Copilot Enterprise. + - If you change subscriptions, restart Visual Studio. -- A GitHub account with [GitHub Copilot](https://github.com/features/copilot) enabled (Pro, Pro+, Business, or Enterprise plan required) -- [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) version 17.14.7 or later -- Agent mode enabled for GitHub Copilot in Visual Studio ([Learn how](/visualstudio/ide/copilot-agent-mode)) +## Assess app readiness -### Sign-in to GitHub Copilot +GitHub Copilot app modernization for .NET assessment helps you find app readiness challenges, learn their impact, and see recommended migration tasks. Each migration task includes references to set up Azure resources, add configurations, and make code changes. Follow these steps to start your migration: -GitHub Copilot is a dependency of the App Modernization Extension and experience. Make sure you're signed-in to GitHub Copilot inside Visual Studio. +1. Clone the [.NET migration copilot samples](https://github.com/Azure-Samples/dotnet-migration-copilot-samples) repository to your computer. -1. Select the Copilot icon at the top of Visual Studio to open the GitHub Copilot pane. -1. Follow the UI prompts to sign-in to Copilot. +1. In Visual Studio, open the **Contoso University** solution from the samples repository. -For more information, see [Set up GitHub Copilot in Visual Studio](/visualstudio/ide/visual-studio-github-copilot-install-and-states). +1. In Solution Explorer, right-click the solution node and select **Modernize**. -## Install the GitHub Copilot app modernization extension + :::image type="content" source="media/modernize-solution.png" alt-text="Screenshot that shows the modernize option in the context menu."::: -To complete the steps ahead, you need to install the GitHub Copilot app modernization for .NET (Preview) Visual Studio extension. +1. The GitHub Copilot Chat window opens with a welcome message and predefined options. Select **Migrate to Azure** from the available choices and send it to Copilot. -1. Inside Visual Studio, navigate to `Extensions` > `Manage Extensions`. -1. Search for **GitHub Copilot app modernization for .NET** in the marketplace. -1. On the extension page, select **Install**. -1. Follow the notification bar prompts to close Visual Studio and complete the installation. -1. Relaunch Visual Studio after installation. + :::image type="content" source="media/modernization-welcome.png" alt-text="Screenshot that shows the welcome message with migration options."::: -You can also view the [GitHub Copilot app modernization for .NET (Preview)](https://aka.ms/appmod-dotnet-marketplace) extension directly on the extension marketplace. - -For more information, see [Find, install, and manage extensions for Visual Studio](/visualstudio/ide/finding-and-using-visual-studio-extensions). - -## Assess application readiness - -App Modernization for .NET assessment helps you identify your application readiness challenges, understand their impact, and find recommended solutions. Each solution recommendation includes references to set up Azure resources, add configurations, and make code changes. Follow these steps to start your migration process with assessment: - -1. Clone the [.NET migration copilot samples](https://github.com/Azure-Samples/dotnet-migration-copilot-samples) repository. -2. In Visual Studio, open the **Contoso University** project folder from the samples repository. -3. Start the assessment using one of the following approaches: - - - **Solution explorer** - - Right-click the top-level solution node, then select `GitHub Copilot app modernization for .NET` > `Run Assessment`. + > [!TIP] + > Instead of steps 3 and 4, you can open **GitHub Copilot Chat** directly and send `@Modernize Migrate to Azure` to start the assessment and migration flow. - :::image type="content" source="media/solution-start-assessment.png" alt-text="A screenshot showing how to start the assessment through the solution explorer."::: +1. A new Copilot chat session opens and shows the welcome message. The assessment starts automatically and analyzes your project for migration readiness. - - **Top navigation** + :::image type="content" source="media/assessment-in-process.png" alt-text="Screenshot that shows assessment in progress with status indicators."::: - On the top menu, go to `Extensions` > `GitHub Copilot app modernization for .NET` > `Run Assessment`. +1. When the assessment finishes, you see a comprehensive assessment report UI page and a list of migration tasks in the chat window. - :::image type="content" source="media/extension-start-assessment.png" alt-text="A screenshot showing how to start the assessment from the top navigation."::: + :::image type="content" source="media/assessment-report.png" alt-text="Screenshot that shows the generated assessment report with detailed findings."::: - - **Search panel** +## App migrations - In the feature search panel (`Ctrl+Shift+P`), search for `Run Assessment`. +GitHub Copilot app modernization for .NET includes [predefined tasks](predefined-tasks.md) for common migration scenarios and follows Microsoft's best practices. -4. When the background task finishes, you see an assessment report tab with the results. +### Start a migration task - :::image type="content" source="media/overview_assessment.png" alt-text="A screenshot showing the generated assessment report."::: +Start a migration task in one of the following ways: - > [!NOTE] - > A small icon in the lower-left corner shows the background task is running. +**Option 1. Run from the Assessment Report** -## Start a migration +Select the **Run Task** button in the Assessment Report from the previous step to start a migration task. -GitHub Copilot app modernization for .NET (Preview) includes [predefined tasks](predefined-tasks.md) for common migration scenarios, following Microsoft's best practices. +**Option 2. Send in Copilot Chat** -1. Select the **Migrate** button in the Assessment Report generated in the previous step to start a migration. +Send the migration task number (for example, 1.1) or its name in the chat. - > [!TIP] - > If you already know which migration scenario you want, go to `GitHub Copilot app modernization for .NET` > `Migration Tasks` and select the appropriate task directly. +:::image type="content" source="media/quickstart-chat-experience.png" alt-text="Screenshot of sending a message in Copilot Chat to start a migration task."::: ### Plan and progress tracker generation -- When you start the migration, GitHub Copilot begins a session in agent mode with predefined prompts. +- When you start the migration, GitHub Copilot starts a session named "App modernization: migrate from `` to ``" in agent mode with predefined prompts. - The tool creates two files in the `.appmod/.migration` folder: - `plan.md` - the overall migration plan - `progress.md` - a progress tracker; GitHub Copilot marks items as it completes tasks -- Edit these files to customize your migration before proceeding. +- Edit these files to customize your migration before you continue. ### Start code remediation -- If you're satisfied with the plan and progress tracker, enter prompt to initiate the migration, such as the following: +- If you're satisfied with the plan and progress tracker, enter a prompt to start the migration, such as: ```console - `The plan and progress tracker look good to me. Go ahead with the migration.` + The plan and progress tracker look good to me. Go ahead with the migration. ``` - GitHub Copilot starts the migration process and might ask for your approval to use knowledge base tools in the Model Context Protocol (MCP) server. Grant permission when prompted. @@ -109,6 +96,22 @@ GitHub Copilot app modernization for .NET (Preview) includes [predefined tasks]( - Apply configuration changes - Make code changes - Build the solution, fix all compilation and configuration errors, and ensure a successful build + - Fix security vulnerabilities + +## Default chat messages + +GitHub Copilot app modernization for .NET gives you default chat message options to streamline your workflow. + +:::image type="content" source="media/quickstart-followup.png" alt-text="Screenshot that shows default chat message options in the Copilot Chat."::: + +You can choose one of the predefined options and send it in the chat: + +- **Run modernization assessment**: Starts a new assessment of your application to identify migration readiness issues and Azure compatibility challenges. +- **View assessment report**: Opens the previous assessment report and shows a summary of migration tasks based on the results. If no previous assessment exists, it runs a new assessment first. +- **Browse top migration tasks**: Shows recommended migration tasks and common modernization scenarios, regardless of any specific assessment results. + +> [!TIP] +> These default messages help you quickly navigate common workflows without typing custom prompts. You can also enter your own messages to interact with Copilot for specific questions or needs. ## Next Steps diff --git a/docs/azure/toc.yml b/docs/azure/toc.yml index 7e49ccf037b5f..5e6e5e8821360 100644 --- a/docs/azure/toc.yml +++ b/docs/azure/toc.yml @@ -33,7 +33,11 @@ items: - name: Predefined Tasks href: ./migration/appmod/predefined-tasks.md - name: Quickstart - Assess and migrate a .NET project + href: ./migration/appmod/containerization.md + - name: Quickstart - Containerize a .NET project href: ./migration/appmod/quickstart.md + - name: Quickstart - Deploy a .NET project to Azure + href: ./migration/appmod/deploy.md - name: Sample - Contoso University href: ./migration/appmod/sample.md - name: Azure Migrate application and code assessment diff --git a/docs/core/diagnostics/observability-with-otel.md b/docs/core/diagnostics/observability-with-otel.md index 7080926ea48fb..349ab0c50fb32 100644 --- a/docs/core/diagnostics/observability-with-otel.md +++ b/docs/core/diagnostics/observability-with-otel.md @@ -99,7 +99,7 @@ This topic is continued with a couple of example walkthroughs for using OpenTele [.NET Aspire](/dotnet/aspire/get-started/aspire-overview) is a set of extensions to .NET to make it easy to create and work with distributed applications. One of the benefits of using .NET Aspire is that telemetry is built in, using the OpenTelemetry libraries for .NET. The default project templates for .NET Aspire contain a `ServiceDefaults` project, part of which is to setup and configure OTel. The Service Defaults project is referenced and initialized by each service in a .NET Aspire solution. -The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient and Runtime Instrumentation packages, and those are configured in the [`Extensions.cs`](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.3/Extensions.cs) file. For exporting telemetry .NET Aspire includes the OTLP exporter by default so that it can provide telemetry visualization using the Aspire Dashboard. +The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient and Runtime Instrumentation packages, and those are configured in the [`Extensions.cs`](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.5/Extensions.cs) file. For exporting telemetry .NET Aspire includes the OTLP exporter by default so that it can provide telemetry visualization using the Aspire Dashboard. The Aspire Dashboard is designed to bring telemetry observation to the local debug cycle, which enables developers to not only ensure that the applications are producing telemetry, but also use that telemetry to diagnose those applications locally. Being able to observe the calls between services is proving to be just as useful at debug time as in production. The .NET Aspire dashboard is launched automatically when you F5 the `AppHost` Project from Visual Studio or `dotnet run` the `AppHost` project. diff --git a/docs/core/porting/github-copilot-app-modernization-overview.md b/docs/core/porting/github-copilot-app-modernization-overview.md index 258f09a2771bf..50e10561ff58d 100644 --- a/docs/core/porting/github-copilot-app-modernization-overview.md +++ b/docs/core/porting/github-copilot-app-modernization-overview.md @@ -7,7 +7,7 @@ ms.author: adegeo ms.topic: overview ms.date: 09/15/2025 -#customer intent: As a developer, I want to upgrade my project so that I can take advantage of the latest features. +#customer intent: As a developer, I want to upgrade my project or migrate the project to Azure so that I can take advantage of the latest features. --- @@ -20,7 +20,7 @@ This process streamlines modernization and boosts developer productivity and con With this assistant, you can: - Upgrade to a newer version of .NET. -- Migrate technologies to Azure. +- Migrate technologies and deploy to Azure. - Modernize your .NET app, especially when upgrading from .NET Framework. - Assess your application's code, configuration, and dependencies. - Plan and set up the right Azure resource. @@ -124,7 +124,7 @@ Predefined tasks capture industry best practices for using Azure services. Curre - **Migrate to Azure Service Bus** - Move from legacy or third-party message queues (such as MSMQ or RabbitMQ) to Azure Service Bus for reliable, cloud-based messaging. + Move from legacy or third-party message queues (such as MSMQ or RabbitMQ) or Amazon SQS (AWS Simple Queue Service) to Azure Service Bus for reliable, cloud-based messaging. - **Migrate to Azure Communication Service email** @@ -138,6 +138,9 @@ Predefined tasks capture industry best practices for using Azure services. Curre Transition from local logging frameworks like log4net, serilog, and Windows event log to OpenTelemetry on Azure. +- **Migrate to Azure Cache for Redis with Managed Identity** + Replace in-memory or local Redis cache implementations with Azure Cache for Redis for high availability, scalability, and enterprise-grade security. + ## How does it work Once you request the modernization agent to upgrade or migrate your app, Copilot analyzes your projects and their dependencies, and then asks you a series of questions about the upgrade or migration. After you answer these questions, a plan is written in the form of a Markdown file. If you tell Copilot to proceed with the upgrade or migration, it follows the steps described in the plan. @@ -165,4 +168,5 @@ The tool only collects data about project types, intent to upgrade, and upgrade ## Related content - [How to upgrade a .NET app with GitHub Copilot app modernization](how-to-upgrade-with-github-copilot.md) +- [Quickstart to migrate a .NET Project](../../azure/migration/appmod/quickstart.md) - [GitHub Copilot app modernization FAQ](github-copilot-app-modernization-faq.yml) diff --git a/docs/csharp/fundamentals/functional/discards.md b/docs/csharp/fundamentals/functional/discards.md index 7df3aaf46f043..34e632203530b 100644 --- a/docs/csharp/fundamentals/functional/discards.md +++ b/docs/csharp/fundamentals/functional/discards.md @@ -57,7 +57,7 @@ You can use a standalone discard to indicate any variable that you choose to ign :::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="ArgNullCheck" ::: -The following example uses a standalone discard to ignore the object returned by an asynchronous operation. Assigning the task has the effect of suppressing the exception that the operation throws as it is about to complete. It makes your intent clear: You want to discard the `Task`, and ignore any errors generated from that asynchronous operation. +The following example uses a standalone discard to ignore the object returned by an asynchronous operation. Assigning the task has the effect of suppressing the compiler warning about unobserved exceptions. It makes your intent clear: You want to discard the `Task`, and propagate any errors generated from that asynchronous operation to callers. :::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="SnippetDiscardTask" ::: diff --git a/docs/csharp/language-reference/builtin-types/ref-struct.md b/docs/csharp/language-reference/builtin-types/ref-struct.md index bdb072b47737e..47968683e9d17 100644 --- a/docs/csharp/language-reference/builtin-types/ref-struct.md +++ b/docs/csharp/language-reference/builtin-types/ref-struct.md @@ -58,7 +58,7 @@ The `Span` type stores a reference through which it accesses the contiguous e ## The disposable pattern -You can define a disposable `ref struct`. To do that, ensure that a `ref struct` fits the [disposable pattern](~/_csharplang/proposals/csharp-8.0/using.md#pattern-based-using). That is, it has an instance `Dispose` method, which is accessible, parameterless and has a `void` return type. You can use the [using statement or declaration](../statements/using.md) with an instance of a disposable `ref struct`. +You can define a disposable `ref struct`. To do that, ensure that a `ref struct` fits the [disposable pattern](../../../standard/design-guidelines/dispose-pattern.md). That is, it has an instance `Dispose` method that's accessible, parameterless, and has a `void` return type. You can use the [using statement or declaration](../statements/using.md) with an instance of a disposable `ref struct`. Beginning with C# 13, you can also implement the on `ref struct` types. However, overload resolution prefers the disposable pattern to the interface method. The compiler resolves to an `IDisposable.Dispose` method only when a suitable `Dispose` method isn't found. diff --git a/docs/csharp/language-reference/statements/using.md b/docs/csharp/language-reference/statements/using.md index 07cc52e4735a6..afe67b89d0db2 100644 --- a/docs/csharp/language-reference/statements/using.md +++ b/docs/csharp/language-reference/statements/using.md @@ -35,7 +35,7 @@ You can declare several instances of the same type in one `using` statement, as When you declare several instances in one `using` statement, they are disposed in reverse order of declaration. -You can also use the `using` statement and declaration with an instance of a [ref struct](../builtin-types/ref-struct.md) that fits the disposable pattern. That is, it has an instance `Dispose` method, which is accessible, parameterless and has a `void` return type. +You can also use the `using` statement and declaration with an instance of a [ref struct](../builtin-types/ref-struct.md) that fits the disposable pattern. That is, it has an instance `Dispose` method that's accessible, parameterless, and has a `void` return type. The `using` statement can also be of the following form: @@ -55,7 +55,7 @@ where `expression` produces a disposable instance. The following example demonst ## C# language specification -For more information, see [The using statement](~/_csharpstandard/standard/statements.md#1314-the-using-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the proposal note about ["pattern-based using" and "using declarations"](~/_csharplang/proposals/csharp-8.0/using.md). +For more information, see [The using statement](~/_csharpstandard/standard/statements.md#1314-the-using-statement) section of the [C# language specification](~/_csharpstandard/standard/README.md). ## See also diff --git a/docs/csharp/language-reference/unsafe-code.md b/docs/csharp/language-reference/unsafe-code.md index a6fb577315963..a7845edd972e8 100644 --- a/docs/csharp/language-reference/unsafe-code.md +++ b/docs/csharp/language-reference/unsafe-code.md @@ -27,6 +27,8 @@ Unsafe code has the following properties: - Using unsafe code introduces security and stability risks. - The code that contains unsafe blocks must be compiled with the [**AllowUnsafeBlocks**](compiler-options/language.md#allowunsafeblocks) compiler option. +For information about best practices for unsafe code in C#, see [Unsafe code best practices](../../standard/unsafe-code/best-practices.md). + ## Pointer types In an unsafe context, a type can be a pointer type, in addition to a value type, or a reference type. A pointer type declaration takes one of the following forms: @@ -148,8 +150,8 @@ internal struct Buffer Fixed-size buffers differ from regular arrays in the following ways: -- May only be used in an `unsafe` context. -- May only be instance fields of structs. +- Can only be used in an `unsafe` context. +- Can only be instance fields of structs. - They're always vectors, or one-dimensional arrays. - The declaration should include the length, such as `fixed char id[8]`. You can't use `fixed char id[]`. @@ -179,7 +181,7 @@ The preceding code illustrates several of the rules on the function accessed as - Function pointers can only be declared in an `unsafe` context. - Methods that take a `delegate*` (or return a `delegate*`) can only be called in an `unsafe` context. -- The `&` operator to obtain the address of a function is allowed only on `static` functions. (This rule applies to both member functions and local functions). +- The `&` operator to obtain the address of a function is allowed only on `static` functions. (This rule applies to both member functions and local functions.) The syntax has parallels with declaring `delegate` types and using pointers. The `*` suffix on `delegate` indicates the declaration is a *function pointer*. The `&` when assigning a method group to a function pointer indicates the operation takes the address of the method. @@ -192,3 +194,7 @@ You can learn more about function pointers in the [Function pointer](~/_csharpla ## C# language specification For more information, see the [Unsafe code](~/_csharpstandard/standard/unsafe-code.md) chapter of the [C# language specification](~/_csharpstandard/standard/README.md). + +## See also + +- [Unsafe code best practices](../../standard/unsafe-code/best-practices.md) diff --git a/docs/csharp/toc.yml b/docs/csharp/toc.yml index a97f1a3196ae7..4192b1deb3902 100644 --- a/docs/csharp/toc.yml +++ b/docs/csharp/toc.yml @@ -174,6 +174,8 @@ items: href: whats-new/version-update-considerations.md - name: Tutorials items: + - name: Explore compound assignment + href: whats-new/tutorials/compound-assignment-operators.md - name: Explore primary constructors href: whats-new/tutorials/primary-constructors.md - name: Explore static interface members diff --git a/docs/csharp/whats-new/tutorials/compound-assignment-operators.md b/docs/csharp/whats-new/tutorials/compound-assignment-operators.md new file mode 100644 index 0000000000000..8744a49c1039c --- /dev/null +++ b/docs/csharp/whats-new/tutorials/compound-assignment-operators.md @@ -0,0 +1,157 @@ +--- +title: Explore user defined instance compound assignment operators +description: "C# 14 enables user defined instance compound assignment operators. These operators can provide better performance by minimizing allocations or copy operations. Learn how to create these operators." +author: billwagner +ms.author: wiwagn +ms.service: dotnet-csharp +ms.topic: tutorial +ms.date: 09/15/2025 +ai-usage: ai-assisted +#customer intent: As a C# developer, I want implement user defined instance compound assignment operators so that my algorithms are more efficient. +--- +# Tutorial: Create compound assignment operators + +C#14.0 adds *user defined compound assignment operators* that enable mutating a data structure in place, rather than creating a new instance. In previous versions of C#, the expression: + +```csharp +a += b; +``` + +Was expanded to the following code: + +```csharp +var tmp = a + b; +a = tmp; +``` + +Depending on the type of `a`, this expansion leads to excessive allocations to create new instances, or copying the values of several properties to set values on the copy. Adding a user defined operator for `+=` indicates a type can do a better job by updating the destination object in place. + +C# supports the existing expansion, but it uses it only when a compound user defined operator isn't available. + +In this tutorial, you: + +> [!div class="checklist"] +> +> * Install prerequisites +> * Analyze the starting sample +> * Implement compound assignment operators +> * Analyze completed sample + +## Prerequisites + +- The .NET 10 preview SDK. Download it from the [.NET download site](https://dotnet.microsoft.com/download/dotnet/10.0). +- Visual Studio 2026 (preview). Download it from the [Visual Studio insiders page](https://visualstudio.microsoft.com/insiders/). + +## Analyze the starting sample + +Run the starter application. You can get it from [the `dotnet/docs` GitHub repository](https://github.com/dotnet/docs/blob/main/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment). The sample application simulates concert attendance tracking at a theater venue. The simulation models realistic arrival patterns throughout the evening, from early attendees to the main rush before showtime. This simulation demonstrates the object allocations when using traditional operators versus the efficiency gains possible with user-defined compound assignment operators. + +The app tracks attendance through multiple theater gates (main floor and balcony sections) as concert-goers arrive. Each gate maintains a count of attendees using a `GateAttendance` record. Throughout the simulation, the code frequently updates these counts using increment (`++`) and addition (`+=`) operations. The following code shows a portion of that simulation: + +:::code language="csharp" source="./snippets/CompoundAssignment/GateAttendanceTests.cs" id="Simulation"::: + +With traditional operators, each operation creates a new `GateAttendance` instance due to the immutable nature of records, leading to significant memory allocations. + +When you run the simulation, you see detailed output showing: + +- Gate-by-gate attendance numbers during different arrival periods. +- Total attendance tracking across all gates. +- A final comprehensive report with attendance statistics. + +You can see a portion of the output: + +```txt +Peak arrival time - all gates busy... + +Peak rush period completed - all gates processed heavy traffic. + +--- Gate Status After Main Rush (7:15 PM) --- +Main Floor Gates: + Main-Floor-Gate-1: 145 attendees + Main-Floor-Gate-2: 168 attendees + Main-Floor-Gate-3: 149 attendees + Main-Floor-Gate-4: 71 attendees + Main Floor Subtotal: 533 attendees + +Balcony Gates: + Balcony-Gate-Left: 164 attendees + Balcony-Gate-Right: 134 attendees + Balcony Subtotal: 298 attendees + +Total Current Attendance: 831 / 1000 + +--- Late Arrivals (7:15 PM - 7:30 PM) --- +Final patrons arriving before curtain... + +Final arrivals processed - concert about to begin! +``` + +Examine the starter `GateAttendance` record class: + +:::code language="csharp" source="./snippets/CompoundAssignment/GateAttendance.cs" id="GateAttendanceStarter"::: + +The `InitialImplementation.GateAttendance` record demonstrates the traditional approach to operator overloading in C#. Notice how both the increment operator (`++`) and addition operator (`+`) create entirely new instances of `GateAttendance` using the `with` expression. Each time you write `gate++` or `gate += partySize`, the operators allocate a new record instance with the updated `Count` value, then return that new instance. While this approach maintains immutability and thread safety, it comes at the cost of frequent memory allocations. In scenarios with many operations—like the concert simulation with hundreds of attendance updates—these allocations accumulate quickly, potentially impacting performance and increasing garbage collection pressure. + +To see this allocation behavior in action, try running the [.NET Object Allocation tracking tool](/visualstudio/profiling/dotnet-alloc-tool) in Visual Studio. When you profile the current implementation during the concert simulation, you discover that it allocates 134 `GateAttendance` objects to complete the relatively small simulation. Each operator call creates a new instance, demonstrating how quickly allocations can accumulate in real-world scenarios. This measurement provides a concrete baseline for comparing the performance improvements you achieve with compound assignment operators. + +## Implement compound assignment operators + +C# 14 introduces user-defined compound assignment operators that enable in-place mutations instead of creating new instances. These operators provide a more efficient alternative to the traditional pattern while maintaining the familiar compound assignment syntax. + +Compound assignment operators use a new syntax that declares `void` return methods with the `operator` keyword. Add the following operators to the `GateAttendance` class: + +```csharp +public void operator +=(int value) => this.property += value; +public void operator ++() => this.property++; +``` + +The key differences from traditional operators are: + +- **Mutation**: They modify the current instance directly using `this`. +- **No new instances**: Unlike traditional operators that return new objects, compound operators modify existing ones. +- **Return type**: Compound assignment operators return `void`, not the type itself. + +When the compiler encounters compound assignment expressions like `a += b` or `++a`, it follows this resolution order: + +1. **Check for compound assignment operator**: If the type defines a user-defined compound assignment operator (for example, `+=` or `++`), use it directly. +2. **Fallback to traditional expansion**: If no compound operator exists, expand to the traditional form (`a = a + b`). + +This means you can implement both approaches simultaneously. The compound operators take precedence when available, but the traditional operators serve as fallbacks for scenarios where compound assignment isn't suitable. + +Compound assignment operators provide several advantages: + +- **Reduced allocations**: Modify objects in-place instead of creating new instances. +- **Improved performance**: Eliminate temporary object creation and reduce garbage collection pressure. +- **Familiar syntax**: Use the same `+=`, `++` syntax developers already know. +- **Backward compatibility**: Traditional operators continue to work as fallbacks. + +The new compound assignment operators are shown in the following code: + +:::code language="csharp" source="./snippets/CompoundAssignment/GateAttendance.cs" id="CompoundAssignmentOperators"::: + +## Analyze finished sample + +Now that you implemented the compound assignment operators, it's time to measure the performance improvement. To see the dramatic difference in memory allocations, run the [.NET Object Allocation tracking tool](/visualstudio/profiling/dotnet-alloc-tool) again on the updated code. + +When you profile the application with the compound assignment operators enabled, you observe a remarkable reduction: only **10 `GateAttendance` objects** are allocated during the entire concert simulation, compared to the previous 134 allocations. This update represents a 92% reduction in object allocations! + +The remaining 10 allocations come from the initial creation of the `GateAttendance` instances for each theater gate (four main floor gates + two balcony gates = six initial instances), plus a few more allocations from other parts of the simulation that don't use the compound operators. + +This allocation reduction translates to real performance benefits: + +- **Reduced memory pressure**: Less frequent garbage collection cycles. +- **Better cache locality**: Fewer object creations mean less memory fragmentation. +- **Improved throughput**: CPU cycles saved from allocation and collection overhead. +- **Scalability**: Benefits multiply in scenarios with higher operation volumes. + +The performance improvement becomes even more significant in production applications where similar patterns occur at much larger scales—imagine tracking millions of transactions, updating thousands of counters, or processing high-frequency data streams. + +Try identifying other opportunities for compound assignment operators in the codebase. Look for patterns where you see traditional assignment operations like `gates.MainFloorGates[1] = gates.MainFloorGates[1] + 4` and consider whether they could benefit from compound assignment syntax. While some of these operations are already using `+=` in the simulation code, the principle applies to any scenario where you repeatedly modify objects rather than creating new instances. + +As a final experiment, change the `GateAttendance` type from a `record class` to a `record struct`. It's a different optimization, and it works in this simulation because the struct has a small memory footprint. Copying a `GateAttendance` struct isn't an expensive operation. Even so, you see small improvements. + +## Related content + +- [What's new in C# 14](../csharp-14.md) +- [Operator overloading - define unary, arithmetic, equality, and comparison operators](../../language-reference/operators/operator-overloading.md) +- [Analyze memory usage by using the .NET Object Allocation tool - Visual Studio](/visualstudio/profiling/dotnet-alloc-tool) diff --git a/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/CompoundAssignment.csproj b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/CompoundAssignment.csproj new file mode 100644 index 0000000000000..b9dbadc899514 --- /dev/null +++ b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/CompoundAssignment.csproj @@ -0,0 +1,11 @@ + + + + Exe + net10.0 + enable + enable + preview + + + diff --git a/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/GateAttendance.cs b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/GateAttendance.cs new file mode 100644 index 0000000000000..c6490b5773d20 --- /dev/null +++ b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/GateAttendance.cs @@ -0,0 +1,44 @@ +// +public record class GateAttendance(string GateId) +{ + public int Count { get; init; } + + public static GateAttendance operator ++(GateAttendance gate) + { + GateAttendance updateGate = gate with { Count = gate.Count + 1 }; + return updateGate; + } + + public static GateAttendance operator +(GateAttendance gate, int partySize) + { + GateAttendance updateGate = gate with { Count = gate.Count + partySize }; + return updateGate; + } +} +// + +namespace FinalImplementation +{ + public record class GateAttendance(string GateId) + { + public int Count { get; private set; } + + public static GateAttendance operator ++(GateAttendance gate) + { + GateAttendance updateGate = gate with { Count = gate.Count + 1 }; + return updateGate; + } + + public static GateAttendance operator +(GateAttendance gate, int partySize) + { + GateAttendance updateGate = gate with { Count = gate.Count + partySize }; + return updateGate; + } + + // + public void operator ++() => Count++; + + public void operator +=(int partySize) => Count += partySize; + // + } +} diff --git a/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/GateAttendanceTests.cs b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/GateAttendanceTests.cs new file mode 100644 index 0000000000000..07933b1d99c0c --- /dev/null +++ b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/GateAttendanceTests.cs @@ -0,0 +1,250 @@ +public static class TheaterConcertSimulation +{ + private const int MAX_ATTENDANCE = 1000; + private const int EXPECTED_SALES = 850; + + public static void SimulateConcertAttendance() + { + Console.WriteLine("=== Royal Theater Concert Attendance Simulation ==="); + Console.WriteLine($"Venue Capacity: {MAX_ATTENDANCE} | Expected Sales: {EXPECTED_SALES}"); + Console.WriteLine("Concert: 'Symphony Under the Stars' - 7:30 PM\n"); + + // Initialize theater gates + var theaterGates = new TheaterGates(); + + Console.WriteLine("--- Gate Status Before Concert ---"); + PrintTheaterStatus(theaterGates); + + // Simulate pre-concert arrival patterns + SimulatePreConcertArrivals(theaterGates); + + Console.WriteLine("\n--- Gate Status After Pre-Concert Arrivals (6:30 PM) ---"); + PrintTheaterStatus(theaterGates); + + // Simulate main arrival rush + SimulateMainArrivalRush(theaterGates); + + Console.WriteLine("\n--- Gate Status After Main Rush (7:15 PM) ---"); + PrintTheaterStatus(theaterGates); + + // Simulate late arrivals + SimulateLateArrivals(theaterGates); + + Console.WriteLine("\n--- Final Attendance Report (7:30 PM - Concert Start) ---"); + GenerateFinalReport(theaterGates); + } + + private static void SimulatePreConcertArrivals(TheaterGates gates) + { + Console.WriteLine("--- Pre-Concert Arrivals (6:00 PM - 6:30 PM) ---"); + Console.WriteLine("Early patrons and season ticket holders arriving...\n"); + + // Early arrivals - mainly main floor, some balcony + // Main floor gates - moderate traffic + ++gates.MainFloorGates[0]; // Single patron + gates.MainFloorGates[0] += 2; // Couple + gates.MainFloorGates[0] += 6; // Corporate early group + gates.MainFloorGates[1] = gates.MainFloorGates[1] + 4; // Family + gates.MainFloorGates[1] += 8; // Season ticket holders + ++gates.MainFloorGates[2]; // Single patron + gates.MainFloorGates[2] += 5; // Early dinner group + gates.MainFloorGates[3] += 3; // Small group + gates.MainFloorGates[3] += 7; // VIP early access + ++gates.MainFloorGates[3]; // Individual VIP + + // Balcony gates - lighter but increased traffic + ++gates.BalconyGates[0]; // Single patron + gates.BalconyGates[0] += 4; // Early bird group + gates.BalconyGates[1] += 2; // Couple + gates.BalconyGates[1] += 6; // Student group with early tickets + ++gates.BalconyGates[1]; // Individual student + + Console.WriteLine("Early arrivals processed through all gates."); + } + + private static void SimulateMainArrivalRush(TheaterGates gates) + { + Console.WriteLine("\n--- Main Arrival Rush (6:30 PM - 7:15 PM) ---"); + Console.WriteLine("Peak arrival time - all gates busy...\n"); + + var random = new Random(); + + // Heavy traffic through main floor gates + for (int i = 0; i < 3; i++) + { + // + // Gate 1 - busiest entrance (target: ~100-130 people) + gates.MainFloorGates[0] += random.Next(8, 15); // Corporate group + ++gates.MainFloorGates[0]; // Single patron + gates.MainFloorGates[0] += random.Next(20, 30); // Tour/large group arrival + gates.MainFloorGates[0] += random.Next(5, 12); // Family groups + ++gates.MainFloorGates[0]; // Solo attendee + + // Gate 2 - second busiest (target: ~85-115 people) + gates.MainFloorGates[1] = gates.MainFloorGates[1] + random.Next(6, 12); // Group booking + ++gates.MainFloorGates[1]; // Single patron + gates.MainFloorGates[1] += random.Next(18, 28); // Large family/reunion + gates.MainFloorGates[1] += random.Next(8, 15); // Corporate/business group + gates.MainFloorGates[1] += random.Next(4, 8); // Couples/small groups + ++gates.MainFloorGates[1]; // Individual patron + // + + // Gate 3 - moderate traffic (target: ~70-95 people) + ++gates.MainFloorGates[2]; // Individual + gates.MainFloorGates[2] += random.Next(4, 8); // Small group + gates.MainFloorGates[2] += random.Next(15, 22); // Community/organization group + gates.MainFloorGates[2] += random.Next(10, 16); // Club/society members + ++gates.MainFloorGates[2]; // Solo attendee + gates.MainFloorGates[2] += random.Next(6, 12); // Friends/social group + + // Gate 4 - lighter but steady (target: ~60-85 people) + gates.MainFloorGates[3] += random.Next(3, 6); // Family group + gates.MainFloorGates[3] += random.Next(8, 15); // Celebration/event group + ++gates.MainFloorGates[3]; // Individual attendee + gates.MainFloorGates[3] += random.Next(5, 10); // Couples/pairs + + // Balcony gates - steady increased flow + // Left balcony gate (target: ~80-100 people) + ++gates.BalconyGates[0]; // Single patron + gates.BalconyGates[0] += random.Next(5, 10); // Small group + gates.BalconyGates[0] += random.Next(15, 25); // Student/educational group + gates.BalconyGates[0] += random.Next(10, 18); // Budget-conscious attendees + ++gates.BalconyGates[0]; // Individual + gates.BalconyGates[0] += random.Next(6, 12); // Senior/community group + + // Right balcony gate (target: ~70-95 people) + gates.BalconyGates[1] += random.Next(4, 8); // Small group + ++gates.BalconyGates[1]; // Individual + gates.BalconyGates[1] += random.Next(16, 24); // Academic/institutional group + gates.BalconyGates[1] += random.Next(10, 16); // Community organization + gates.BalconyGates[1] += random.Next(4, 8); // Young professionals/friends + ++gates.BalconyGates[1]; // Solo patron + } + + Console.WriteLine("Peak rush period completed - all gates processed heavy traffic."); + } + + private static void SimulateLateArrivals(TheaterGates gates) + { + Console.WriteLine("\n--- Late Arrivals (7:15 PM - 7:30 PM) ---"); + Console.WriteLine("Final patrons arriving before curtain...\n"); + + var random = new Random(); + + // Light but varied traffic as concert approaches + // Main floor gates - scattered late arrivals (1-8 people per gate) + ++gates.MainFloorGates[0]; // Last-minute arrival + gates.MainFloorGates[0] += random.Next(2, 6); // Delayed group + + gates.MainFloorGates[1] += random.Next(1, 4); // Rushing small group + gates.MainFloorGates[1] += random.Next(2, 7); // Traffic/parking delayed group + + ++gates.MainFloorGates[2]; // Single late arrival + gates.MainFloorGates[2] += random.Next(1, 5); // Delayed couple/small group + + gates.MainFloorGates[3] += random.Next(1, 4); // Late couple + gates.MainFloorGates[3] += random.Next(2, 6); // Last-minute purchasers + ++gates.MainFloorGates[3]; // Solo rush arrival + + // Balcony gates - lighter late traffic (1-5 people per gate) + ++gates.BalconyGates[0]; // Late balcony patron + gates.BalconyGates[0] += random.Next(1, 4); // Delayed small group + + gates.BalconyGates[1] += random.Next(1, 3); // Final arrivals + gates.BalconyGates[1] += random.Next(2, 5); // Work-delayed group + ++gates.BalconyGates[1]; // Individual latecomer + + Console.WriteLine("Final arrivals processed - concert about to begin!"); + } + + private static void PrintTheaterStatus(TheaterGates gates) + { + Console.WriteLine("Main Floor Gates:"); + for (int i = 0; i < gates.MainFloorGates.Length; i++) + { + var gate = gates.MainFloorGates[i]; + Console.WriteLine($" {gate.GateId}: {gate.Count,3} attendees"); + } + + var mainFloorTotal = gates.MainFloorGates.Sum(g => g.Count); + Console.WriteLine($" Main Floor Subtotal: {mainFloorTotal,3} attendees"); + + Console.WriteLine("\nBalcony Gates:"); + for (int i = 0; i < gates.BalconyGates.Length; i++) + { + var gate = gates.BalconyGates[i]; + Console.WriteLine($" {gate.GateId}: {gate.Count,3} attendees"); + } + + var balconyTotal = gates.BalconyGates.Sum(g => g.Count); + Console.WriteLine($" Balcony Subtotal: {balconyTotal,3} attendees"); + + var totalAttendance = mainFloorTotal + balconyTotal; + Console.WriteLine($"\nTotal Current Attendance: {totalAttendance,3} / {MAX_ATTENDANCE}"); + } + + private static void GenerateFinalReport(TheaterGates gates) + { + var mainFloorTotal = gates.MainFloorGates.Sum(g => g.Count); + var balconyTotal = gates.BalconyGates.Sum(g => g.Count); + var totalAttendance = mainFloorTotal + balconyTotal; + + PrintTheaterStatus(gates); + + Console.WriteLine("\n" + new string('=', 50)); + Console.WriteLine("FINAL CONCERT ATTENDANCE REPORT"); + Console.WriteLine(new string('=', 50)); + + Console.WriteLine($"Expected Sales: {EXPECTED_SALES,3}"); + Console.WriteLine($"Actual Attendance: {totalAttendance,3}"); + Console.WriteLine($"Venue Capacity: {MAX_ATTENDANCE,3}"); + + var attendanceRate = (double)totalAttendance / EXPECTED_SALES * 100; + var capacityUtilization = (double)totalAttendance / MAX_ATTENDANCE * 100; + + Console.WriteLine($"Attendance Rate: {attendanceRate,5:F1}% of expected"); + Console.WriteLine($"Capacity Utilization: {capacityUtilization,5:F1}% of maximum"); + + // Gate distribution analysis + Console.WriteLine($"\nGate Distribution:"); + Console.WriteLine($"Main Floor: {mainFloorTotal,3} ({(double)mainFloorTotal/totalAttendance*100:F1}%)"); + Console.WriteLine($"Balcony: {balconyTotal,3} ({(double)balconyTotal/totalAttendance*100:F1}%)"); + + // Performance indicators using switch expression + var performanceMessage = totalAttendance switch + { + var t when t >= EXPECTED_SALES * 0.95 => "\n✅ Excellent attendance! Concert exceeded expectations.", + var t when t >= EXPECTED_SALES * 0.85 => "\n✅ Good attendance! Concert met expectations.", + var t when t >= EXPECTED_SALES * 0.70 => "\n⚠️ Moderate attendance. Consider marketing review.", + _ => "\n❌ Low attendance. Significant marketing review needed." + }; + + Console.WriteLine(performanceMessage); + + Console.WriteLine("\nConcert begins! 🎼"); + } +} + +public struct TheaterGates +{ + // Main floor gates (4 gates) - initialized with default gate instances + public GateAttendance[] MainFloorGates { get; } = + [ + new GateAttendance("Main-Floor-Gate-1"), + new GateAttendance("Main-Floor-Gate-2"), + new GateAttendance("Main-Floor-Gate-3"), + new GateAttendance("Main-Floor-Gate-4") + ]; + + // Balcony gates (2 gates) - initialized with default gate instances + public GateAttendance[] BalconyGates { get; } = + [ + new GateAttendance("Balcony-Gate-Left"), + new GateAttendance("Balcony-Gate-Right") + ]; + + // Explicit constructor required when using field initializers in structs + public TheaterGates() + { + } +} \ No newline at end of file diff --git a/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/Program.cs b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/Program.cs new file mode 100644 index 0000000000000..1ed24fe90c33b --- /dev/null +++ b/docs/csharp/whats-new/tutorials/snippets/CompoundAssignment/Program.cs @@ -0,0 +1,2 @@ +TheaterConcertSimulation.SimulateConcertAttendance(); + diff --git a/docs/framework/release-notes/2024/02-14-february-security-and-quality-rollup.md b/docs/framework/release-notes/2024/02-14-february-security-and-quality-rollup.md index e6de03150a708..c6b8bffbef996 100644 --- a/docs/framework/release-notes/2024/02-14-february-security-and-quality-rollup.md +++ b/docs/framework/release-notes/2024/02-14-february-security-and-quality-rollup.md @@ -30,7 +30,7 @@ Addresses an issue where version of the OSS zlib library is out of date. (*Appli ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -74,7 +74,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | .NET Framework 4.8 | [5034617](https://support.microsoft.com/kb/5034617) | | **Windows Server 2012** | **[5034688](https://support.microsoft.com/kb/5034688)** | | .NET Framework 3.5 | [55033897](https://support.microsoft.com/kb/5033897) | -| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034621](https://support.microsoft.com/kb/5034621) | +| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5034621](https://support.microsoft.com/topic/february-13-2024-security-and-quality-rollup-for-net-framework-4-6-2-4-7-4-7-1-4-7-2-for-windows-server-2012-kb5034621-d00874ee-c468-41c8-a6a7-73779d1820c5) | | .NET Framework 4.8 | [5034616](https://support.microsoft.com/kb/5034616) | | **Windows Server 2008 R2** | **[5034687](https://support.microsoft.com/kb/5034687)** | | .NET Framework 3.5.1 | [5033899](https://support.microsoft.com/kb/5033899) | diff --git a/docs/framework/release-notes/2024/04-09-april-security-and-quality-rollup.md b/docs/framework/release-notes/2024/04-09-april-security-and-quality-rollup.md index eebb11f5cc0a3..d6b38bb84086e 100644 --- a/docs/framework/release-notes/2024/04-09-april-security-and-quality-rollup.md +++ b/docs/framework/release-notes/2024/04-09-april-security-and-quality-rollup.md @@ -46,7 +46,7 @@ Addresses an issue when the native C# compiler (csc.exe) is used to compile code ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -55,7 +55,7 @@ The following table outlines the updates in this release. | Product version | Cumulative update | | --- | --- | | **Microsoft server operating system, version 23H2** | | -| .NET Framework 3.5, 4.8.1 | [5036617](https://support.microsoft.com/kb/5036617) | +| .NET Framework 3.5, 4.8.1 | [5036617](https://support.microsoft.com/topic/april-9-2024-kb5036617-cumulative-update-for-net-framework-3-5-and-4-8-1-for-microsoft-server-operating-system-version-23h2-fddb7c8a-9f68-4bda-96ca-e1033802e6e3) | | **Windows 11, version 22H2 and Windows 11, version 23H2** | | | .NET Framework 3.5, 4.8.1 | [5036620](https://support.microsoft.com/kb/5036620) | | **Windows 11, version 21H2** | **[5037037](https://support.microsoft.com/kb/5037037)** | @@ -89,7 +89,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | .NET Framework 4.8 | [5036614](https://support.microsoft.com/kb/5036614) | | **Windows Server 2012** | **[5037039](https://support.microsoft.com/kb/5037039)** | | .NET Framework 3.5 | [5036624](https://support.microsoft.com/kb/5036624) | -| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5036605](https://support.microsoft.com/kb/5036605) | +| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5036605](https://support.microsoft.com/topic/april-9-2024-security-and-quality-rollup-for-net-framework-4-6-2-4-7-4-7-1-4-7-2-for-windows-server-2012-kb5036605-60a4d4aa-c68c-441e-aff0-d9c3a58d562d) | | .NET Framework 4.8 | [5036612](https://support.microsoft.com/kb/5036612) | | **Windows Server 2008 R2** | **[5037038](https://support.microsoft.com/kb/5037038)** | | .NET Framework 3.5.1 | [5036626](https://support.microsoft.com/kb/5036626) | @@ -108,7 +108,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | .NET Framework 3.5.1 | [5036634](https://support.microsoft.com/kb/5036634) | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5036631](https://support.microsoft.com/kb/5036631) | | .NET Framework 4.8 |[5036632](https://support.microsoft.com/kb/5036632) | -| **Windows Server 2008** | **[5037128](https://support.microsoft.com/kb/5037128)** | +| **Windows Server 2008** | **[5037128](https://support.microsoft.com/topic/april-9-2024-security-only-update-for-net-framework-2-0-3-0-3-5-sp1-4-6-2-for-windows-server-2008-sp2-kb5037128-19f7a85f-a04f-4085-b68e-f2d8fb7196bd)** | | .NET Framework 2.0, 3.0 | [5036633](https://support.microsoft.com/kb/5036633) | | .NET Framework 3.5 SP1 | [5036636](https://support.microsoft.com/kb/5036636) | | .NET Framework 4.6.2 | [5036631](https://support.microsoft.com/kb/5036631) | diff --git a/docs/framework/release-notes/2024/07-09-july-security-and-quality-rollup.md b/docs/framework/release-notes/2024/07-09-july-security-and-quality-rollup.md index ebedb9af1c209..0f63a6fa2efc6 100644 --- a/docs/framework/release-notes/2024/07-09-july-security-and-quality-rollup.md +++ b/docs/framework/release-notes/2024/07-09-july-security-and-quality-rollup.md @@ -32,7 +32,7 @@ Addresses an issue with the size of memory leaks associated with AccessibleObjec ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -75,7 +75,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | **Windows Server 2012 R2** | **[5041023](https://support.microsoft.com/kb/5041023)** | | .NET Framework 3.5 | [5039910](https://support.microsoft.com/kb/5039910) | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5039881](https://support.microsoft.com/kb/5039881) | -| .NET Framework 4.8 | [5039890](https://support.microsoft.com/kb/5039890) | +| .NET Framework 4.8 | [5039890](https://support.microsoft.com/topic/july-9-2024-security-and-quality-rollup-for-net-framework-4-8-for-windows-server-2012-r2-kb5039890-bdb019dc-5181-4770-97a2-4443c97d5b89) | | **Windows Server 2012** | **[5041022](https://support.microsoft.com/kb/5041022)** | | .NET Framework 3.5 | [5039908](https://support.microsoft.com/kb/5039908) | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5039880](https://support.microsoft.com/kb/5039880) | @@ -94,7 +94,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | Product version | Security only update | | --- | --- | | **Windows Server 2008 R2** | **[5041026](https://support.microsoft.com/kb/5041027)** | -| .NET Framework 3.5.1 | [5040119](https://support.microsoft.com/kb/5040119) | +| .NET Framework 3.5.1 | [5040119](https://support.microsoft.com/topic/july-9-2024-security-only-update-for-net-framework-3-5-1-for-windows-server-2008-r2-sp1-kb5040119-de499122-b8e3-4583-9d55-1546959d3161) | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5040122](https://support.microsoft.com/kb/5040122) | | .NET Framework 4.8 |[5040123](https://support.microsoft.com/kb/5040123) | | **Windows Server 2008** | **[5041027](https://support.microsoft.com/kb/5041027)** | diff --git a/docs/framework/release-notes/2024/07-25-july-preview-cumulative-update.md b/docs/framework/release-notes/2024/07-25-july-preview-cumulative-update.md index 39bfe6bc9fc17..41eec69c17bec 100644 --- a/docs/framework/release-notes/2024/07-25-july-preview-cumulative-update.md +++ b/docs/framework/release-notes/2024/07-25-july-preview-cumulative-update.md @@ -46,6 +46,6 @@ The following table outlines the updates in this release. | .NET Framework 3.5, 4.8.1 | [5041169](https://support.microsoft.com/kb/5041169) | | **Windows 10, version 22H2** | **[5041355](https://support.microsoft.com/kb/5041355)** | | .NET Framework 3.5, 4.8 | [5041167](https://support.microsoft.com/kb/5041167) | -| .NET Framework 3.5, 4.8.1 | [5041168](https://support.microsoft.com/kb/5041168) | +| .NET Framework 3.5, 4.8.1 | [5041168](https://support.microsoft.com/topic/july-23-2024-kb5041168-cumulative-update-preview-for-net-framework-3-5-and-4-8-1-for-windows-10-version-22h2-5a91fb88-60f3-4289-836f-454dfa42ade5) | The operating system row lists a KB that's used for update offering purposes. When the operating system KB is offered, the applicability logic determines the specific .NET Framework update(s) that will be installed. Updates for individual .NET Framework versions will be installed based on the version of .NET Framework that is already present on the device. Because of this, the operating system KB is not expected to be listed as installed updates on the device. The expected update to be installed are the .NET Framework–specific version updates listed in the previous table. diff --git a/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md b/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md index ae6bcc805fb90..7f84c5ddac7d3 100644 --- a/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md +++ b/docs/framework/release-notes/2024/10-08-october-security-and-quality-rollup.md @@ -53,7 +53,7 @@ The following table outlines the updates in this release. | **Microsoft server operating system, version 22H2** | **[5044087](https://support.microsoft.com/kb/5044087)** | | .NET Framework 3.5, 4.8 | [5044025](https://support.microsoft.com/kb/5044025) | | .NET Framework 3.5, 4.8.1 | [5044035](https://support.microsoft.com/kb/5044035) | -| **Windows 11, version 21H2** |**[5044092](https://support.microsoft.com/kb/5044092)** | +| **Windows 11, version 21H2** |**[5044092](https://support.microsoft.com/topic/october-8-2024-kb5044092-cumulative-update-for-net-framework-3-5-4-8-and-4-8-1-for-windows-11-version-21h2-a1c3dbfb-d769-4327-b692-aff2ba1b977a)** | | .NET Framework 3.5, 4.8 | [5044023](https://support.microsoft.com/kb/5044023) | | .NET Framework 3.5, 4.8.1 | [5044032](https://support.microsoft.com/kb/5044032) | | **Microsoft server operating system, version 21H2** | **[5044099](https://support.microsoft.com/kb/5044099)** | @@ -84,7 +84,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | .NET Framework 4.8 | [5044026](https://support.microsoft.com/kb/5044026) | | **Windows Server 2012** | **[5044096](https://support.microsoft.com/kb/5044096)** | | .NET Framework 3.5 | [5044009](https://support.microsoft.com/kb/5044009) | -| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5044017](https://support.microsoft.com/kb/5044017) | +| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5044017](https://support.microsoft.com/topic/october-8-2024-security-and-quality-rollup-for-net-framework-4-6-2-4-7-4-7-1-4-7-2-for-windows-server-2012-kb5044017-4a4ff56b-a0c9-42e1-9eef-84f8d1d06337) | | .NET Framework 4.8 | [5044024](https://support.microsoft.com/kb/5044024) | | **Windows Server 2008 R2** | **[5044095](https://support.microsoft.com/kb/5044095)** | | .NET Framework 3.5.1 | [5044011](https://support.microsoft.com/kb/5044011) | diff --git a/docs/framework/release-notes/2024/11-12-november-security-and-quality-rollup.md b/docs/framework/release-notes/2024/11-12-november-security-and-quality-rollup.md index 012d5f36de4a4..fec8e79b8dac0 100644 --- a/docs/framework/release-notes/2024/11-12-november-security-and-quality-rollup.md +++ b/docs/framework/release-notes/2024/11-12-november-security-and-quality-rollup.md @@ -42,7 +42,7 @@ Addresses an issue with .NET API UserPrincipal.GetAuthorizationGroups to retriev ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -72,7 +72,7 @@ The following table outlines the updates in this release. | .NET Framework 3.5, 4.8.1 | [5045933](https://support.microsoft.com/kb/5045933) | | **Windows 10 1809 and Windows Server 2019** | **[5046540](https://support.microsoft.com/kb/5046540)** | | .NET Framework 3.5, 4.7.2 | [5046268](https://support.microsoft.com/kb/5046268) | -| .NET Framework 3.5, 4.8 | [5046269](https://support.microsoft.com/kb/5046269) | +| .NET Framework 3.5, 4.8 | [5046269](https://support.microsoft.com/topic/november-12-2024-kb5046269-cumulative-update-for-net-framework-3-5-and-4-8-for-windows-10-version-1809-and-windows-server-2019-b914c843-c35a-4c94-a81f-1c8b0e7117ff) | | **Windows 10 1607 and Windows Server 2016** | | | .NET Framework 3.5, 4.6.2, 4.7, 4.7.1, 4.7.2 | [5046612](https://support.microsoft.com/kb/5046612) | | .NET Framework 4.8 | [5046266](https://support.microsoft.com/kb/5046266) | @@ -91,9 +91,9 @@ The following table is for earlier Windows and Windows Server versions for Secur | .NET Framework 4.8 | [5046259](https://support.microsoft.com/kb/5046259) | | **Windows Server 2008 R2** | **[5046543](https://support.microsoft.com/kb/5046543)** | | .NET Framework 3.5.1 | [5044011](https://support.microsoft.com/kb/5044011) | -| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5046261](https://support.microsoft.com/kb/5046261)| +| .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5046261](https://support.microsoft.com/topic/november-12-2024-security-and-quality-rollup-for-net-framework-4-6-2-4-7-4-7-1-4-7-2-for-windows-server-2008-r2-sp1-and-windows-server-2008-sp2-kb5046261-8cc3ca40-5c95-4ae9-bf2b-9c73e7b35a3f)| | .NET Framework 4.8 |[5046258](https://support.microsoft.com/kb/5046258) | -| **Windows Server 2008** | **[5046546](https://support.microsoft.com/kb/5046546)** | +| **Windows Server 2008** | **[5046546](https://support.microsoft.com/topic/november-12-2024-security-and-quality-rollup-for-net-framework-2-0-3-0-3-5-sp1-4-6-2-for-windows-server-2008-sp2-kb5046546-c7038822-4378-4a24-8f5e-95ba77cf2a89)** | | .NET Framework 2.0, 3.0 | [5044010](https://support.microsoft.com/kb/5044010) | | .NET Framework 3.5 SP1 | [5040673](https://support.microsoft.com/kb/5040673) | | .NET Framework 4.6.2 | [5046261](https://support.microsoft.com/kb/5046261) | diff --git a/docs/framework/release-notes/2024/11-21-november-preview-cumulative-update.md b/docs/framework/release-notes/2024/11-21-november-preview-cumulative-update.md index d4e149e151645..8cfdb919dfaa3 100644 --- a/docs/framework/release-notes/2024/11-21-november-preview-cumulative-update.md +++ b/docs/framework/release-notes/2024/11-21-november-preview-cumulative-update.md @@ -37,7 +37,7 @@ The following table outlines the updates in this release. | .NET Framework 3.5, 4.8.1 | [5048162](https://support.microsoft.com/kb/5048162) | | **Windows 11, version 22H2 and Windows 11, version 23H2** | | | .NET Framework 3.5, 4.8.1 | [5048163](https://support.microsoft.com/kb/5048163) | -| **Windows 10, version 22H2** | **[5048292](https://support.microsoft.com/kb/5048292)** | +| **Windows 10, version 22H2** | **[5048292](https://support.microsoft.com/topic/november-21-2024-kb5048292-cumulative-update-preview-for-net-framework-3-5-4-8-and-4-8-1-for-windows-10-version-22h2-5d645428-d7be-4fe1-8b5d-34b7506f7d55)** | | .NET Framework 3.5, 4.8 | [5048160](https://support.microsoft.com/kb/5048160) | | .NET Framework 3.5, 4.8.1 | [5048161](https://support.microsoft.com/kb/5048161) | diff --git a/docs/framework/release-notes/2025/01-14-january-cumulative-update.md b/docs/framework/release-notes/2025/01-14-january-cumulative-update.md index d6a525030e765..3e3e9b6afb712 100644 --- a/docs/framework/release-notes/2025/01-14-january-cumulative-update.md +++ b/docs/framework/release-notes/2025/01-14-january-cumulative-update.md @@ -51,7 +51,7 @@ The following table outlines the updates in this release. | **Windows 10, version 22H2** | **[5050188](https://support.microsoft.com/kb/5050188)** | | .NET Framework 3.5, 4.8 | [5049613](https://support.microsoft.com/kb/5049613) | | .NET Framework 3.5, 4.8.1 | [5049621](https://support.microsoft.com/kb/5049621) | -| **Windows 10, version 21H2** | **[5050416](https://support.microsoft.com/kb/5050416)** | +| **Windows 10, version 21H2** | **[5050416](https://support.microsoft.com/topic/january-14-2025-kb5050416-cumulative-update-for-net-framework-3-5-4-8-and-4-8-1-for-windows-10-version-21h2-6312b2f7-6a46-4743-b309-d4a163ca9ead)** | | .NET Framework 3.5, 4.8 | [5049613](https://support.microsoft.com/kb/5049613) | | .NET Framework 3.5, 4.8.1 | [5049621](https://support.microsoft.com/kb/5049621) | | **Windows 10 1809 and Windows Server 2019** | **[5050182](https://support.microsoft.com/kb/5050182)** | @@ -86,7 +86,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | --- | --- | | **Windows Server 2008 R2** | **[5050180](https://support.microsoft.com/kb/5050180)** | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5049627](https://support.microsoft.com/kb/5049627)| -| .NET Framework 4.8 |[5049628](https://support.microsoft.com/kb/5049628) | +| .NET Framework 4.8 |[5049628](https://support.microsoft.com/topic/january-14-2025-security-only-update-for-net-framework-4-8-for-windows-server-2008-r2-sp1-kb5049628-b1a63ec4-1f96-4a6a-a79c-200a4610fdf4) | | **Windows Server 2008** | **[5050181](https://support.microsoft.com/kb/5050181)** | | .NET Framework 4.6.2 | [5049627](https://support.microsoft.com/kb/5049627) | diff --git a/docs/framework/release-notes/2025/04-08-april-cumulative-update.md b/docs/framework/release-notes/2025/04-08-april-cumulative-update.md index 59ec820918490..808a47a22b65a 100644 --- a/docs/framework/release-notes/2025/04-08-april-cumulative-update.md +++ b/docs/framework/release-notes/2025/04-08-april-cumulative-update.md @@ -30,7 +30,7 @@ Addresses an issue with printing large number of pages due to an OutOfMemory exc ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -78,8 +78,8 @@ The following table is for earlier Windows and Windows Server versions for Secur | **Windows Server 2008 R2** | **[5055684](https://support.microsoft.com/kb/5055684)** | | .NET Framework 3.5.1 | [5044011](https://support.microsoft.com/kb/5044011) | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5054696](https://support.microsoft.com/kb/5054696) | -| .NET Framework 4.8 |[5055171](https://support.microsoft.com/kb/5055171) | -| **Windows Server 2008** | **[5055687](https://support.microsoft.com/kb/5055687)** | +| .NET Framework 4.8 |[5055171](https://support.microsoft.com/topic/april-8-2025-security-and-quality-rollup-for-net-framework-4-8-for-windows-server-2008-r2-sp1-kb5055171-e9d77437-8093-4f86-a5d4-815c8a30aa4c) | +| **Windows Server 2008** | **[5055687](https://support.microsoft.com/topic/april-8-2025-security-and-quality-rollup-for-net-framework-2-0-3-0-3-5-sp1-4-6-2-for-windows-server-2008-sp2-kb5055687-9c7cd4f4-b30e-4e9d-a183-d241b7a72440)** | | .NET Framework 2.0, 3.0 | [5044010](https://support.microsoft.com/kb/5044010) | | .NET Framework 3.5 SP1 | [5040673](https://support.microsoft.com/kb/5040673) | | .NET Framework 4.6.2 | [5054696](https://support.microsoft.com/kb/5054696) | diff --git a/docs/framework/release-notes/2025/07-08-july-cumulative-update.md b/docs/framework/release-notes/2025/07-08-july-cumulative-update.md index 3603bee73a6ec..985a5dfff79ab 100644 --- a/docs/framework/release-notes/2025/07-08-july-cumulative-update.md +++ b/docs/framework/release-notes/2025/07-08-july-cumulative-update.md @@ -30,7 +30,7 @@ Addresses an issue where interactions between .NET Framework DLL loads and OS co ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables @@ -44,7 +44,7 @@ This release contains no known issues. | .NET Framework 3.5, 4.8.1 | [5062062](https://support.microsoft.com/kb/5062062) | | **Windows 11, version 22H2 and Windows 11, version 23H2** | | | .NET Framework 3.5, 4.8.1 | [5056580](https://support.microsoft.com/kb/5056580) | -| **Microsoft server operating system, version 22H2** | **[5062159](https://support.microsoft.com/kb/5062159)** | +| **Microsoft server operating system, version 22H2** | **[5062159](https://support.microsoft.com/topic/july-8-2025-kb5062159-cumulative-update-for-net-framework-3-5-4-8-and-4-8-1-for-windows-server-2022-b088c07f-6f7d-424c-8b2f-819ab05091ef)** | | .NET Framework 3.5, 4.8 | [5062063](https://support.microsoft.com/kb/5062063) | | .NET Framework 3.5, 4.8.1 | [5062061](https://support.microsoft.com/kb/5062061) | | **Microsoft server operating system, version 21H2** | **[5062159](https://support.microsoft.com/kb/5062159)** | @@ -79,7 +79,7 @@ The following table is for earlier Windows and Windows Server versions for Secur | .NET Framework 3.5.1 | [5044011](https://support.microsoft.com/kb/5044011) | | .NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2 | [5062071](https://support.microsoft.com/kb/5062071) | | .NET Framework 4.8 |[5062065](https://support.microsoft.com/kb/5062065) | -| **Windows Server 2008** | **[5055687](https://support.microsoft.com/kb/5055687)** | +| **Windows Server 2008** | **[5055687](https://support.microsoft.com/topic/april-8-2025-security-and-quality-rollup-for-net-framework-2-0-3-0-3-5-sp1-4-6-2-for-windows-server-2008-sp2-kb5055687-9c7cd4f4-b30e-4e9d-a183-d241b7a72440)** | | .NET Framework 2.0, 3.0 | [5044010](https://support.microsoft.com/kb/5044010) | | .NET Framework 3.5 SP1 | [5040673](https://support.microsoft.com/kb/5040673) | | .NET Framework 4.6.2 | [5062071](https://support.microsoft.com/kb/5062071) | diff --git a/docs/framework/release-notes/2025/08-26-august-cumulative-update-preview.md b/docs/framework/release-notes/2025/08-26-august-cumulative-update-preview.md index 6969ff596581f..372da75d034a7 100644 --- a/docs/framework/release-notes/2025/08-26-august-cumulative-update-preview.md +++ b/docs/framework/release-notes/2025/08-26-august-cumulative-update-preview.md @@ -5,7 +5,7 @@ ms.date: 08/26/2025 --- # August 2025 cumulative update preview -_Released August 26, 2025_ +_Released August 26, 2025_ _Update August 29, 2025 to include Windows 11, version 24H2_ ## Summary of what's new in this release @@ -38,7 +38,7 @@ The following table outlines the updates in this release. | Product version | Cumulative update preview | | --- | --- | | **Windows 11, version 24H2** | | -| .NET Framework 3.5, 4.8.1 | [5064401](https://support.microsoft.com/kb/5064401) | +| .NET Framework 3.5, 4.8.1 | [5064401](https://support.microsoft.com/topic/august-28-2025-kb5064401-cumulative-update-for-net-framework-3-5-and-4-8-1-for-windows-11-version-24h2-and-microsoft-server-operating-system-version-24h2-71f4180b-3364-4d0e-8032-e8aca043b0fe) | | **Windows 11, version 23H2** | | | .NET Framework 3.5, 4.8.1 | [5064403](https://support.microsoft.com/kb/5064403) | | **Windows 10, version 22H2** | **[5064794](https://support.microsoft.com/kb/5064794)** | diff --git a/docs/framework/release-notes/2025/09-09-september-cumulative-update.md b/docs/framework/release-notes/2025/09-09-september-cumulative-update.md index 03bf621d39d73..a1c5283ea1b35 100644 --- a/docs/framework/release-notes/2025/09-09-september-cumulative-update.md +++ b/docs/framework/release-notes/2025/09-09-september-cumulative-update.md @@ -30,21 +30,21 @@ Addressed an update for GB18030 certificate for Chinese language changes. (*Appl ## Known issues -This release contains no known issues. +This release contains no known issues. ## Summary tables | Product version | Cumulative update | | --- | --- | | **Windows 11, version 24H2** | | -| .NET Framework 3.5, 4.8.1 | [5064401](https://support.microsoft.com/kb/5064401) | +| .NET Framework 3.5, 4.8.1 | [5064401](https://support.microsoft.com/topic/august-28-2025-kb5064401-cumulative-update-for-net-framework-3-5-and-4-8-1-for-windows-11-version-24h2-and-microsoft-server-operating-system-version-24h2-71f4180b-3364-4d0e-8032-e8aca043b0fe) | | **Microsoft server operating system, version 24H2** | | | .NET Framework 3.5, 4.8.1 | [5064401](https://support.microsoft.com/kb/5064401) | | **Microsoft server operating system, version 23H2** | | | .NET Framework 3.5, 4.8.1 | [5065756](https://support.microsoft.com/kb/5065756) | | **Windows 11, version 22H2 and Windows 11, version 23H2** | | | .NET Framework 3.5, 4.8.1 | [5064403](https://support.microsoft.com/kb/5064403) | -| **Microsoft server operating system, version 22H2** | **[5065962](https://support.microsoft.com/kb/5065962)** | +| **Microsoft server operating system, version 22H2** | **[5065962](https://support.microsoft.com/topic/september-9-2025-kb5065962-cumulative-update-for-net-framework-3-5-4-8-and-4-8-1-for-windows-server-2022-55389349-2511-4062-ba42-aa3434986582)** | | .NET Framework 3.5, 4.8 | [5065748](https://support.microsoft.com/kb/5065748) | | .NET Framework 3.5, 4.8.1 | [5065753](https://support.microsoft.com/kb/5065753) | | **Microsoft server operating system, version 21H2** | **[5065962](https://support.microsoft.com/kb/5065962)** | diff --git a/docs/fsharp/tools/development-tools.md b/docs/fsharp/tools/development-tools.md index b219a7d22c7af..5136ae56e57a3 100644 --- a/docs/fsharp/tools/development-tools.md +++ b/docs/fsharp/tools/development-tools.md @@ -3,15 +3,15 @@ title: F# Development Tools description: Learn about development tools for F#. ms.date: 11/03/2021 --- -# F# Development Tools +# F# development tools This article describes some of the primary development tools used with F#. -## .NET Command-line Tools +## .NET command-line tools You can install command-line tools for F# in multiple ways, depending on your environment. See [Install F#](../get-started/install-fsharp.md). -## Integrated Development Environments (IDEs) +## Integrated development environments (IDEs) ### F# with Visual Studio @@ -25,12 +25,12 @@ F# can be installed as part of [Visual Studio Code](https://code.visualstudio.co Other IDEs are available for F#. For more information, see [F# Tools](https://dotnet.microsoft.com/languages/fsharp/tools). -## Community Tools +## Community tools Many tools and libraries for F# are provided by the F# community. These include: * [Fantomas](https://github.com/fsprojects/fantomas#fantomas) - The F# code formatting tool -* [FSharpLint](https://fsprojects.github.io/FSharpLint/) - An F# code checking tool +* [FSharpLint](https://github.com/fsprojects/FSharpLint) - An F# code checking tool * [FAKE](https://fsprojects.github.io/FAKE/) - An F# build automation tool For more comprehensive lists, see the F# Software Foundation's [Guide to F# Community Projects](https://fsharp.org/community/projects/), or search on the web. diff --git a/docs/fundamentals/code-analysis/style-rules/ide0063.md b/docs/fundamentals/code-analysis/style-rules/ide0063.md index 64c1100e85457..e8e57fc829ec1 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide0063.md +++ b/docs/fundamentals/code-analysis/style-rules/ide0063.md @@ -26,7 +26,7 @@ dev_langs: ## Overview -This style rule concerns the use of [`using` statements](../../../csharp/language-reference/statements/using.md) without curly braces, also known as `using` declarations. This [alternative syntax](~/_csharplang/proposals/csharp-8.0/using.md) was introduced in C# 8.0. +This style rule concerns the use of [`using` statements](../../../csharp/language-reference/statements/using.md) without curly braces, also known as `using` declarations. This alternative syntax was introduced in C# 8.0. ## Options diff --git a/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md b/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md index 68f4246c01113..c8f2739edf406 100644 --- a/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md +++ b/docs/fundamentals/networking/telemetry/includes/aspire-telemetry-overview.md @@ -2,6 +2,6 @@ A simple way to collect traces and metrics in ASP.NET applications is to use [.N The default project templates for .NET Aspire contain a `ServiceDefaults` project. Each service in the .NET Aspire solution has a reference to the Service Defaults project. The services use it to set up and configure OTel. -The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient, and Runtime Instrumentation packages. These instrumentation components are configured in the [Extensions.cs](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.3/Extensions.cs) file. To support telemetry visualization in Aspire Dashboard, the Service Defaults project also includes the OTLP exporter by default. +The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient, and Runtime Instrumentation packages. These instrumentation components are configured in the [Extensions.cs](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.5/Extensions.cs) file. To support telemetry visualization in Aspire Dashboard, the Service Defaults project also includes the OTLP exporter by default. Aspire Dashboard is designed to bring telemetry observation to the local debug cycle, which enables developers to ensure that the applications are producing telemetry. The telemetry visualization also helps to diagnose those applications locally. Being able to observe the calls between services is as useful at debug time as in production. The .NET Aspire dashboard is launched automatically when you F5 the `AppHost` Project from Visual Studio or `dotnet run` the `AppHost` project from command line. diff --git a/quest-config.json b/quest-config.json index 11cbab1b2866c..b5a7b174d4c1f 100644 --- a/quest-config.json +++ b/quest-config.json @@ -10,7 +10,7 @@ { "Label": "dotnet-csharp/svc", "ParentNodeId": 410745 - }, + } ], "DefaultParentNode": 410746, "WorkItemTags": [