Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/azure/includes/dotnet-all.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions docs/azure/includes/dotnet-new.md

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions docs/azure/migration/appmod/coding-agent-support.md
Original file line number Diff line number Diff line change
@@ -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)
121 changes: 121 additions & 0 deletions docs/azure/migration/appmod/copilot-cli-support.md
Original file line number Diff line number Diff line change
@@ -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)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/azure/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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
Expand Down
11 changes: 3 additions & 8 deletions docs/core/porting/github-copilot-app-modernization/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ ms.date: 09/23/2025

GitHub Copilot app modernization is a GitHub Copilot agent that helps upgrade projects to newer versions of .NET and migrate .NET applications to Azure quickly and confidently by guiding you through assessment, solution recommendations, code fixes, and validation - all within Visual Studio.

This process streamlines modernization and boosts developer productivity and confidence. GitHub Copilot app modernization is an all-in-one upgrade and migration assistant that uses AI to improve developer velocity, quality, and results.
This process streamlines modernization and boosts developer productivity and confidence. GitHub Copilot app modernization is an all-in-one upgrade and migration agent that uses AI to improve developer velocity, quality, and results.

With this assistant, you can:
With this agent, you can:

- Upgrade to a newer version of .NET.
- Migrate technologies and deploy to Azure.
Expand Down Expand Up @@ -55,22 +55,17 @@ The modernization agent supports upgrading projects coded in C#. The following t
- Class libraries
- Console apps

> [!IMPORTANT]
> .NET Framework upgrade scenarios are currently in preview, which includes technologies such as Windows Forms for .NET Framework and ASP.NET. Using the modernization agent to design an upgrade plan might work in limited scenarios. If upgrading an ASP.NET project (or related technologies such as MVC, Razor Pages, Web API) see [ASP.NET Migration](/aspnet/core/migration/fx-to-core) for recommendations.

To learn how to start an upgrade, see [How to upgrade a .NET app with GitHub Copilot app modernization](how-to-upgrade-with-github-copilot.md).

### Upgrade paths

The following upgrade paths are supported:

- Upgrade projects from older .NET versions to the latest.
- Upgrade .NET Framework projects to .NET.
- Modernize your code base with new features.
- Migrate components and services to Azure.

> [!IMPORTANT]
> Upgrading projects from .NET Framework to the latest version of .NET is still in preview.

## Migrate .NET projects to Azure

The modernization agent combines automated analysis, AI-driven code remediation, build and vulnerability checks, and deployment automation to simplify migrations to Azure. The following capabilities describe how the agent assesses readiness, applies fixes, and streamlines the migration process:
Expand Down
19 changes: 16 additions & 3 deletions docs/core/tools/global-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ The version of the .NET SDK to use.

This field:

- Doesn't have wildcard support; that is, you must specify the full version number.
- Requires the full version number, such as 9.0.100.
- Doesn't support version numbers like 9, 9.0, or 9.0.x.
- Doesn't have wildcard support.
- Doesn't support version ranges.

#### `allowPrerelease`
Expand Down Expand Up @@ -90,7 +92,7 @@ The following table shows the possible values for the `rollForward` key:
#### `paths`

- Type: Array of `string`
- Available since: .NET 10 Preview 3 SDK.
- Available since: .NET 10 SDK.

Specifies the locations that should be considered when searching for a compatible .NET SDK. Paths can be absolute or relative to the location of the *global.json* file. The special value `$host$` represents the location corresponding to the running `dotnet` executable.

Expand All @@ -103,7 +105,7 @@ This feature enables using local SDK installations (such as SDKs relative to a r
#### `errorMessage`

- Type: `string`
- Available since: .NET 10 Preview 3 SDK.
- Available since: .NET 10 SDK.

Specifies a custom error message displayed when the SDK resolver can't find a compatible .NET SDK.

Expand Down Expand Up @@ -209,6 +211,17 @@ The following example shows how to specify additional SDK search paths and a cus
}
```

The following example shows an invalid version specified. The output of the command `dotnet --info` shows the error message: "Version '10.0' is not valid for the 'sdk/version' value."

```json
{
"sdk": {
"version": "10.0",
"rollForward": "latestFeature"
}
}
```

The following example shows how to specify `Microsoft.Testing.Platform` as the test runner:

```json
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/fundamentals/tutorials/file-based-programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ On unix, you can run file-based apps directly, typing the source file name on th

The location of `dotnet` can be different on different unix installations. Use the command `which dotnet` to locate the `dotnet` host in your environment.

Alternatively, you can use #!/usr/bin/env dotnet to resolve the dotnet path from the PATH environment variable automatically:
Alternatively, you can use `#!/usr/bin/env dotnet` to resolve the dotnet path from the PATH environment variable automatically:

```csharp
#!/usr/bin/env dotnet
Expand Down
Loading