diff --git a/docs/azure/migration/appmod/coding-agent-support.md b/docs/azure/migration/appmod/coding-agent-support.md new file mode 100644 index 0000000000000..166a8dc5f3032 --- /dev/null +++ b/docs/azure/migration/appmod/coding-agent-support.md @@ -0,0 +1,108 @@ +--- +title: Migrate .NET apps to Azure using GitHub Copilot app modernization in Coding Agent +description: Overview of migrating .NET applications to Azure using GitHub Copilot app modernization in the Copilot Coding Agent. +ms.author: ninpan +ms.reviewer: jessiehuang +ms.topic: overview +ms.date: 11/14/2025 +ms.custom: devx-track-dotnet +ms.subservice: migration-copilot +--- + +# Migrate .NET apps using GitHub Copilot app modernization in the Copilot Coding Agent + +This article shows you how to migrate .NET apps using **GitHub Copilot app modernization** in the [**Copilot Coding Agent**](https://docs.github.com/en/copilot/concepts/agents/coding-agent/about-coding-agent). The agent works independently in the background to complete modernization tasks. Delegate tasks through issues or pull requests; the agent runs them in the cloud to help your team complete modernization efficiently. + +> [!NOTE] +> Copilot Coding Agent is available with GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, and GitHub Copilot Enterprise plans. The agent is available in all GitHub repositories except those owned by managed user accounts or where it's explicitly disabled. + +## Prerequisites + +- [**Copilot Coding Agent**](https://docs.github.com/en/copilot/concepts/agents/coding-agent/about-coding-agent) configured. +- A GitHub Copilot Pro, Pro+, Business, or Enterprise subscription. +- A GitHub repository containing your application source code. +- A Copilot environment with the .NET 10 SDK installed. See [customize the agent environment](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment) for details. To install the .NET 10 SDK, add these steps to the `copilot-setup-steps.yml`: + + ```yaml + - name: Set up .NET 10 + uses: actions/setup-dotnet@v5 + with: + dotnet-version: '10.x' + + - name: Verify .NET 10 + run: | + dotnet --info + ``` + +## Get started + +1. Go to **Settings** for the target repository you want to modernize (admin access required). +1. Select **Copilot**, then select **Coding Agent**. +1. In the **Model Context Protocol (MCP)** section under **MCP Configuration**, add the following configuration, then select **Save Configuration**: + + ```json + { + "mcpServers": { + "DotNetAppModMcpServer-migrate": { + "type": "local", + "command": "dnx", + "tools": [ + "*" + ], + "args": [ + "Microsoft.AppModernization.McpServer.DotNet.Migration", + "--yes", + "--source", + "https://api.nuget.org/v3/index.json" + ] + } + } + } + ``` + + :::image type="content" source="./media/coding-agent/mcp.png" lightbox="./media/coding-agent/mcp.png" alt-text="Screenshot of MCP configuration in coding agent."::: + +1. (Optional) If environment variables are required, set them under **Environment → Copilot** in the settings. These variables initialize automatically the first time an agentic task is invoked in this repository. +1. Save the MCP configuration. + +### Migrate your .NET application to Azure + +To migrate your .NET application to Azure, describe your migration scenario in the agent prompt. For example: + +```text +Migrate this project from local file I/O to Azure Blob Storage +Migrate this project from local SQL Server to Azure SQL Database with managed identity +Migrate this project from file-based logging to OpenTelemetry +``` + +For details on predefined migration tasks, see [migration tasks](predefined-tasks.md). + +1. Open the Agents panel and enter your prompt. After you submit it, Copilot starts a new session and opens a new pull request. It appears in the list below the prompt box. Copilot works on the task and adds you as a reviewer when it finishes, triggering a notification. + + :::image type="content" source="./media/coding-agent/migrate-input.png" lightbox="./media/coding-agent/migrate-input.png" alt-text="Screenshot of .NET migrate task input in Coding Agent."::: + +1. After the migration starts, monitor the progress: + + :::image type="content" source="./media/coding-agent/migrate-progress.png" lightbox="./media/coding-agent/migrate-progress.png" alt-text="Screenshot of .NET migrate progress in Coding Agent."::: + +1. Finally, review the migration summary for insights—ensure your app is fully migrated and cloud-ready. + + :::image type="content" source="./media/coding-agent/migrate-completion.png" lightbox="./media/coding-agent/migrate-completion.png" alt-text="Screenshot of .NET migrate completion in Coding Agent."::: + +### Deploy your .NET application to Azure + +After migration, deploy directly from Coding Agent using a prompt such as: + +```text +Deploy this application to Azure +``` + +Follow the same workflow as migration - the overall process remains consistent. + +## Provide feedback + +Share feedback about the GitHub Copilot Coding Agent using the [GitHub Copilot agent feedback form](https://aka.ms/ghcp-appmod/feedback). + +## Reference + +- [Using GitHub Copilot Coding Agent](https://docs.github.com/en/copilot/how-tos/use-copilot-agents) diff --git a/docs/azure/migration/appmod/copilot-cli-support.md b/docs/azure/migration/appmod/copilot-cli-support.md new file mode 100644 index 0000000000000..e632e4a8f1ffd --- /dev/null +++ b/docs/azure/migration/appmod/copilot-cli-support.md @@ -0,0 +1,121 @@ +--- +title: Migrate .NET apps to Azure using GitHub Copilot app modernization in Copilot CLI +description: Overview of migrating .NET applications to Azure using GitHub Copilot app modernization in Copilot CLI. +ms.topic: concept-article +ms.custom: devx-track-dotnet +ms.date: 11/11/2025 +author: alexwolfmsft +ms.author: alexwolf +ms.reviewer: jessiehuang +--- + +# Migrate .NET apps to Azure using GitHub Copilot app modernization in Copilot CLI + +## Overview + +Learn how to migrate .NET applications to Azure with **GitHub Copilot app modernization** in the [**Copilot CLI**](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli). + +>[!NOTE] +> GitHub Copilot CLI is available in the GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, and GitHub Copilot Enterprise plans. +> If you receive Copilot through an organization, an admin must enable the Copilot CLI policy in the organization settings. + +## Why use Copilot CLI with app modernization + +- Run modernization tasks from the terminal - no need to switch to an IDE. +- Use interactive (human-in-the-loop) and batch workflows. + +## Prerequisites + +- [Install Copilot CLI](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli). +- A GitHub Copilot subscription. See [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot). +- [Install the .NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0). + +## Getting started + +1. In a terminal, navigate to the .NET project folder containing the code you want to work on. +1. Run `copilot` to start Copilot CLI. + + ```bash + copilot + ``` + + :::image type="content" source="./media/copilot-cli-entrance.png" lightbox="./media/copilot-cli-entrance.png" alt-text="Screenshot of app modernization entrance in Copilot CLI."::: + + Copilot asks you to confirm that you trust the files in this folder. For details, see [Using Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli#trusted-directories). + + Choose one of the options: + + - **Yes, proceed**: Copilot can work with the files in this location for this session only. + - **Yes, and remember this folder for future sessions**: Trust the files in this folder for this and future sessions. You won't be asked again when you start Copilot CLI here. Only choose this option if you are sure it will always be safe for Copilot to work with files in this location. + - **No, exit (Esc)**: End the Copilot CLI session. + +1. Add MCP servers. Run `/mcp add` in Copilot CLI using the configuration below. For example, to add the .NET migration MCP server: + + ```bash + /mcp add DotNetAppModMcpServer-migrate + ``` + + Fill the fields as follows: + + - Server Type: Local + - Command: `dnx Microsoft.AppModernization.McpServer.DotNet.Migration --yes --source https://api.nuget.org/v3/index.json` + - Environment Variables: Leave empty. + - Tools: Use the default value `*`. + + Or update the `~/.config/mcp-config.json` file with the following information. For details, see [Add an MCP server](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli#add-an-mcp-server). + + ```json + { + "mcpServers": { + "DotNetAppModMcpServer-migrate": { + "type": "local", + "command": "dnx", + "tools": [ + "*" + ], + "args": [ + "Microsoft.AppModernization.McpServer.DotNet.Migration", + "--yes", + "--source", + "https://api.nuget.org/v3/index.json" + ] + } + } + } + ``` + + Run `/mcp show` to confirm the MCP server configuration. + + ```bash + /mcp show + ``` + +1. Run the migration task in Copilot CLI. + + Describe your migration scenario in Copilot CLI to migrate your .NET app to Azure. + Use a prompt like *migrate from X to Y* for any migration task. + Copilot CLI supports predefined migration scenarios that follow Microsoft best practices. For details, see [migration tasks](predefined-tasks.md). + + Example prompts: + + ```text + Migrate this app from local file I/O to Azure Blob Storage + Migrate this app from local SQL Server to Azure SQL Database with managed identity + Migrate this app from file-based logging to OpenTelemetry + ``` + + The migration task runs and shows progress in Copilot CLI. + + :::image type="content" source="./media/migrate-details.png" lightbox="./media/migrate-details.png" alt-text="Screenshot of a .NET migration task progress details in Copilot CLI."::: + + After migration, view the summary: + + :::image type="content" source="./media/migrate-summary.png" lightbox="./media/migrate-summary.png" alt-text="Screenshot of the .NET migration summary in Copilot CLI."::: + +## Provide feedback + +Share feedback about GitHub Copilot CLI using the [GitHub Copilot CLI feedback form](https://aka.ms/AM4DFeedback). + +## Reference + +- [Using GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli#using-copilot-cli) diff --git a/docs/azure/migration/appmod/media/coding-agent/mcp.png b/docs/azure/migration/appmod/media/coding-agent/mcp.png new file mode 100644 index 0000000000000..b0c71bb3562de Binary files /dev/null and b/docs/azure/migration/appmod/media/coding-agent/mcp.png differ diff --git a/docs/azure/migration/appmod/media/coding-agent/migrate-completion.png b/docs/azure/migration/appmod/media/coding-agent/migrate-completion.png new file mode 100644 index 0000000000000..51a9a7c2b16ba Binary files /dev/null and b/docs/azure/migration/appmod/media/coding-agent/migrate-completion.png differ diff --git a/docs/azure/migration/appmod/media/coding-agent/migrate-input.png b/docs/azure/migration/appmod/media/coding-agent/migrate-input.png new file mode 100644 index 0000000000000..1d6020e3a21bd Binary files /dev/null and b/docs/azure/migration/appmod/media/coding-agent/migrate-input.png differ diff --git a/docs/azure/migration/appmod/media/coding-agent/migrate-progress.png b/docs/azure/migration/appmod/media/coding-agent/migrate-progress.png new file mode 100644 index 0000000000000..bf172e85e750a Binary files /dev/null and b/docs/azure/migration/appmod/media/coding-agent/migrate-progress.png differ diff --git a/docs/azure/migration/appmod/media/copilot-cli-entrance.png b/docs/azure/migration/appmod/media/copilot-cli-entrance.png new file mode 100644 index 0000000000000..463df4ee55e28 Binary files /dev/null and b/docs/azure/migration/appmod/media/copilot-cli-entrance.png differ diff --git a/docs/azure/migration/appmod/media/migrate-details.png b/docs/azure/migration/appmod/media/migrate-details.png new file mode 100644 index 0000000000000..098aab0cc2931 Binary files /dev/null and b/docs/azure/migration/appmod/media/migrate-details.png differ diff --git a/docs/azure/migration/appmod/media/migrate-summary.png b/docs/azure/migration/appmod/media/migrate-summary.png new file mode 100644 index 0000000000000..46ee6b2740763 Binary files /dev/null and b/docs/azure/migration/appmod/media/migrate-summary.png differ diff --git a/docs/azure/toc.yml b/docs/azure/toc.yml index d0eee40a27fc0..7d1c62dc351bc 100644 --- a/docs/azure/toc.yml +++ b/docs/azure/toc.yml @@ -38,6 +38,10 @@ items: href: ./migration/appmod/containerization.md - name: Quickstart - Deploy a .NET project to Azure href: ./migration/appmod/deploy.md + - name: Quickstart - Migrate a .NET project using Copilot Coding Agent + href: ./migration/appmod/coding-agent-support.md + - name: Quickstart - Migrate a .NET project using the Copilot CLI + href: ./migration/appmod/copilot-cli-support.md - name: Sample - Contoso University href: ./migration/appmod/sample.md - name: Azure Migrate application and code assessment