Skip to content

Commit 89366b3

Browse files
authored
Add docs for dotnet migration support for copilot cli and coding agent (dotnet#49730)
* Add dotnet support for Copilot CLI and Copilot Coding Agent
1 parent 250123c commit 89366b3

File tree

10 files changed

+233
-0
lines changed

10 files changed

+233
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: Migrate .NET apps to Azure using GitHub Copilot app modernization in Coding Agent
3+
description: Overview of migrating .NET applications to Azure using GitHub Copilot app modernization in the Copilot Coding Agent.
4+
ms.author: ninpan
5+
ms.reviewer: jessiehuang
6+
ms.topic: overview
7+
ms.date: 11/14/2025
8+
ms.custom: devx-track-dotnet
9+
ms.subservice: migration-copilot
10+
---
11+
12+
# Migrate .NET apps using GitHub Copilot app modernization in the Copilot Coding Agent
13+
14+
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.
15+
16+
> [!NOTE]
17+
> 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.
18+
19+
## Prerequisites
20+
21+
- [**Copilot Coding Agent**](https://docs.github.com/en/copilot/concepts/agents/coding-agent/about-coding-agent) configured.
22+
- A GitHub Copilot Pro, Pro+, Business, or Enterprise subscription.
23+
- A GitHub repository containing your application source code.
24+
- 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`:
25+
26+
```yaml
27+
- name: Set up .NET 10
28+
uses: actions/setup-dotnet@v5
29+
with:
30+
dotnet-version: '10.x'
31+
32+
- name: Verify .NET 10
33+
run: |
34+
dotnet --info
35+
```
36+
37+
## Get started
38+
39+
1. Go to **Settings** for the target repository you want to modernize (admin access required).
40+
1. Select **Copilot**, then select **Coding Agent**.
41+
1. In the **Model Context Protocol (MCP)** section under **MCP Configuration**, add the following configuration, then select **Save Configuration**:
42+
43+
```json
44+
{
45+
"mcpServers": {
46+
"DotNetAppModMcpServer-migrate": {
47+
"type": "local",
48+
"command": "dnx",
49+
"tools": [
50+
"*"
51+
],
52+
"args": [
53+
"Microsoft.AppModernization.McpServer.DotNet.Migration",
54+
"--yes",
55+
"--source",
56+
"https://api.nuget.org/v3/index.json"
57+
]
58+
}
59+
}
60+
}
61+
```
62+
63+
:::image type="content" source="./media/coding-agent/mcp.png" lightbox="./media/coding-agent/mcp.png" alt-text="Screenshot of MCP configuration in coding agent.":::
64+
65+
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.
66+
1. Save the MCP configuration.
67+
68+
### Migrate your .NET application to Azure
69+
70+
To migrate your .NET application to Azure, describe your migration scenario in the agent prompt. For example:
71+
72+
```text
73+
Migrate this project from local file I/O to Azure Blob Storage
74+
Migrate this project from local SQL Server to Azure SQL Database with managed identity
75+
Migrate this project from file-based logging to OpenTelemetry
76+
```
77+
78+
For details on predefined migration tasks, see [migration tasks](predefined-tasks.md).
79+
80+
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.
81+
82+
:::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.":::
83+
84+
1. After the migration starts, monitor the progress:
85+
86+
:::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.":::
87+
88+
1. Finally, review the migration summary for insights—ensure your app is fully migrated and cloud-ready.
89+
90+
:::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.":::
91+
92+
### Deploy your .NET application to Azure
93+
94+
After migration, deploy directly from Coding Agent using a prompt such as:
95+
96+
```text
97+
Deploy this application to Azure
98+
```
99+
100+
Follow the same workflow as migration - the overall process remains consistent.
101+
102+
## Provide feedback
103+
104+
Share feedback about the GitHub Copilot Coding Agent using the [GitHub Copilot agent feedback form](https://aka.ms/ghcp-appmod/feedback).
105+
106+
## Reference
107+
108+
- [Using GitHub Copilot Coding Agent](https://docs.github.com/en/copilot/how-tos/use-copilot-agents)
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: Migrate .NET apps to Azure using GitHub Copilot app modernization in Copilot CLI
3+
description: Overview of migrating .NET applications to Azure using GitHub Copilot app modernization in Copilot CLI.
4+
ms.topic: concept-article
5+
ms.custom: devx-track-dotnet
6+
ms.date: 11/11/2025
7+
author: alexwolfmsft
8+
ms.author: alexwolf
9+
ms.reviewer: jessiehuang
10+
---
11+
12+
# Migrate .NET apps to Azure using GitHub Copilot app modernization in Copilot CLI
13+
14+
## Overview
15+
16+
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).
17+
18+
>[!NOTE]
19+
> GitHub Copilot CLI is available in the GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, and GitHub Copilot Enterprise plans.
20+
> If you receive Copilot through an organization, an admin must enable the Copilot CLI policy in the organization settings.
21+
22+
## Why use Copilot CLI with app modernization
23+
24+
- Run modernization tasks from the terminal - no need to switch to an IDE.
25+
- Use interactive (human-in-the-loop) and batch workflows.
26+
27+
## Prerequisites
28+
29+
- [Install Copilot CLI](https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli).
30+
- A GitHub Copilot subscription. See [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot).
31+
- [Install the .NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0).
32+
33+
## Getting started
34+
35+
1. In a terminal, navigate to the .NET project folder containing the code you want to work on.
36+
1. Run `copilot` to start Copilot CLI.
37+
38+
```bash
39+
copilot
40+
```
41+
42+
:::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.":::
43+
44+
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).
45+
46+
Choose one of the options:
47+
48+
- **Yes, proceed**: Copilot can work with the files in this location for this session only.
49+
- **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.
50+
- **No, exit (Esc)**: End the Copilot CLI session.
51+
52+
1. Add MCP servers. Run `/mcp add` in Copilot CLI using the configuration below. For example, to add the .NET migration MCP server:
53+
54+
```bash
55+
/mcp add DotNetAppModMcpServer-migrate
56+
```
57+
58+
Fill the fields as follows:
59+
60+
- Server Type: Local
61+
- Command: `dnx Microsoft.AppModernization.McpServer.DotNet.Migration --yes --source https://api.nuget.org/v3/index.json`
62+
- Environment Variables: Leave empty.
63+
- Tools: Use the default value `*`.
64+
65+
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).
66+
67+
```json
68+
{
69+
"mcpServers": {
70+
"DotNetAppModMcpServer-migrate": {
71+
"type": "local",
72+
"command": "dnx",
73+
"tools": [
74+
"*"
75+
],
76+
"args": [
77+
"Microsoft.AppModernization.McpServer.DotNet.Migration",
78+
"--yes",
79+
"--source",
80+
"https://api.nuget.org/v3/index.json"
81+
]
82+
}
83+
}
84+
}
85+
```
86+
87+
Run `/mcp show` to confirm the MCP server configuration.
88+
89+
```bash
90+
/mcp show
91+
```
92+
93+
1. Run the migration task in Copilot CLI.
94+
95+
Describe your migration scenario in Copilot CLI to migrate your .NET app to Azure.
96+
Use a prompt like *migrate from X to Y* for any migration task.
97+
Copilot CLI supports predefined migration scenarios that follow Microsoft best practices. For details, see [migration tasks](predefined-tasks.md).
98+
99+
Example prompts:
100+
101+
```text
102+
Migrate this app from local file I/O to Azure Blob Storage
103+
Migrate this app from local SQL Server to Azure SQL Database with managed identity
104+
Migrate this app from file-based logging to OpenTelemetry
105+
```
106+
107+
The migration task runs and shows progress in Copilot CLI.
108+
109+
:::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.":::
110+
111+
After migration, view the summary:
112+
113+
:::image type="content" source="./media/migrate-summary.png" lightbox="./media/migrate-summary.png" alt-text="Screenshot of the .NET migration summary in Copilot CLI.":::
114+
115+
## Provide feedback
116+
117+
Share feedback about GitHub Copilot CLI using the [GitHub Copilot CLI feedback form](https://aka.ms/AM4DFeedback).
118+
119+
## Reference
120+
121+
- [Using GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli#using-copilot-cli)
198 KB
Loading
452 KB
Loading
53.3 KB
Loading
485 KB
Loading
281 KB
Loading
1.21 MB
Loading
1.1 MB
Loading

docs/azure/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ items:
4040
href: ./migration/appmod/containerization.md
4141
- name: Quickstart - Deploy a .NET project to Azure
4242
href: ./migration/appmod/deploy.md
43+
- name: Quickstart - Migrate a .NET project using Copilot Coding Agent
44+
href: ./migration/appmod/coding-agent-support.md
45+
- name: Quickstart - Migrate a .NET project using the Copilot CLI
46+
href: ./migration/appmod/copilot-cli-support.md
4347
- name: Sample - Contoso University
4448
href: ./migration/appmod/sample.md
4549
- name: Azure Migrate application and code assessment

0 commit comments

Comments
 (0)