Skip to content

Commit 8a297d1

Browse files
adegeoanangaurIEvangelist
authored
Add docs for GHCU (#46243)
* Initial draft of copilot upgrade (#1851) * Initial draft of copilot upgrade * Update docs/core/porting/github-copilot-app-modernization-install.md Co-authored-by: Anand Gaurav <[email protected]> * Temp * Add FAQ * fixes * fixes * More fixes * Screenshots * Updates * Minor * edits * Apply suggestions from code review Co-authored-by: David Pine <[email protected]> * MInor --------- Co-authored-by: Anand Gaurav <[email protected]> Co-authored-by: David Pine <[email protected]> * Final updates for release --------- Co-authored-by: Anand Gaurav <[email protected]> Co-authored-by: David Pine <[email protected]>
1 parent ce59cc4 commit 8a297d1

File tree

7 files changed

+333
-0
lines changed

7 files changed

+333
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
### YamlMime:FAQ
2+
metadata:
3+
title: GitHub Copilot app modernization - upgrade for .NET FAQ
4+
description: "This article answers frequently asked questions about GitHub Copilot app modernization - upgrade for .NET."
5+
titleSuffix: ""
6+
author: adegeo
7+
ms.author: adegeo
8+
ms.topic: faq
9+
ms.date: 05/16/2025
10+
11+
title: GitHub Copilot app modernization - upgrade for .NET FAQ
12+
summary: |
13+
GitHub Copilot app modernization - upgrade for .NET is an interactive GitHub Copilot extension that adds powerful upgrade capabilities to Visual Studio. This article answers frequently asked questions. For more information about the tool, see [What is GitHub Copilot app modernization - upgrade for .NET?](github-copilot-app-modernization-overview.md).
14+
15+
sections:
16+
- name: Scenarios
17+
questions:
18+
- question: What can the tool do?
19+
answer: |
20+
Currently, app modernization - upgrade for .NET helps you upgrade your .NET projects to newer versions of .NET. The tool is an extension for Visual Studio that performs the following steps in a GitHub Copilot chat session:
21+
22+
- Analyze your projects and proposes an upgrade plan.
23+
- According to the plan, runs a series of tasks to upgrade your projects.
24+
- Operates in a working branch under a local Git repository.
25+
- Automatically fix issues during the code transformation.
26+
- Report progress and allow access to code changes & logs.
27+
- Learns from the interactive experience with you (within the context of the session) to improve subsequent transformations.
28+
29+
- question: What can the tool upgrade?
30+
answer: |
31+
App modernization - upgrade for .NET currently focuses on migrating your projects from one version of .NET to another. For example, upgrading from .NET Core 3.1 or .NET 6, to .NET 9. It also upgrades dependencies and fixes errors in the code post-migration.
32+
33+
Besides upgrading the target framework, the tool can work with the following types of projects:
34+
35+
- Azure Functions.
36+
- Console apps and class libraries.
37+
- Web technologies such as:
38+
- MVC
39+
- Blazor
40+
- Razor Pages
41+
- Web API
42+
- Desktop technologies such as Windows Forms and Windows Presentation Foundation.
43+
- Test projects such as MSTest and NUnit.
44+
45+
- question: What limitations are there?
46+
answer: |
47+
- It doesn't support .NET Framework projects. (First upgrade the project to .NET with the [Upgrade Assistant tool](upgrade-assistant-overview.md))
48+
- Only Git repositories are supported.
49+
- There's no guarantee that the upgrade suggestions are considered best practices.
50+
- The LLM doesn't persist learning from the upgrade. Meaning, code fixes and corrections you provide during the upgrade process don't persist and can't be remembered for future upgrades.
51+
52+
- question: What data is collected?
53+
answer: |
54+
The tool only collects telemetry information about project types, intent to upgrade, and upgrade duration. The data is aggregated through Visual Studio itself and doesn't contain any user-identifiable information. For more information about Microsoft's privacy policy, see [Visual Studio Customer Experience Improvement Program](/visualstudio/ide/visual-studio-experience-improvement-program?view=vs-2022).
55+
56+
- question: Can I disable telemetry?
57+
answer: |
58+
Yes, you can disable telemetry through Visual Studio itself. In Visual Studio, select **Help** > **Privacy** > **Privacy Settings** > **"No, I would not like to participate."**
59+
60+
- question: Can I train the model based on my code base?
61+
answer: |
62+
No. Unlike traditional AI tools where you might enter freeform prompts, the tool operates in a more structured way. The AI is embedded within the build-and-fix process, meaning, the prompts it uses are predefined and tied to the upgrade plan. So it's not something you can train on your codebase, and it's not something you can manually steer with custom instructions, beyond the changes you can make to the plan markdown file.
63+
64+
However, the tool does have some adaptability within a session. If you manually adjust a fix, it learns from that interaction in the short term and applies similar corrections if it encounters the same issue again. Think of it as refining its approach within the scope of that upgrade. We never store a user's codebase and never use your code for training the model. Once an upgrade is complete, session data is deleted and not stored.
65+
66+
additionalContent: |
67+
## Related content
68+
69+
To learn more, see [What is GitHub Copilot app modernization - upgrade for .NET?](github-copilot-app-modernization-overview.md).
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Install GitHub Copilot app modernization - upgrade for .NET
3+
description: "Learn how to install the GitHub Copilot app modernization - upgrade for .NET Visual Studio extension. App modernization assists you when upgrading projects to the latest dependencies or when upgrading to a new version of .NET"
4+
titleSuffix: ""
5+
author: adegeo
6+
ms.author: adegeo
7+
ms.topic: install-set-up-deploy
8+
ms.date: 05/16/2025
9+
10+
#customer intent: As a developer, I want to install GitHub Copilot App Modernization so that I can upgrade my projects.
11+
12+
---
13+
14+
# Install GitHub Copilot app modernization - upgrade for .NET
15+
16+
This article guides you through installing GitHub Copilot app modernization - upgrade for .NET extension in Visual Studio.
17+
18+
## Prerequisites
19+
20+
- Windows Operating System
21+
- [Visual Studio 2022 version 17.14 or newer](https://visualstudio.microsoft.com/downloads/).
22+
- [.NET desktop development workload](/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#change-workloads-or-individual-components).
23+
24+
## Visual Studio Extension
25+
26+
The following steps install the Visual Studio extension.
27+
28+
> [!TIP]
29+
> As an alternative to using the **Manage Extensions** feature of Visual Studio, you can download and run the extensions installer from the [Visual Studio Marketplace](https://aka.ms/ghcp-appmod/dotnet-upgrade-vsix).
30+
31+
01. Open Visual Studio.
32+
33+
If the **Open Recent \ Get Started** window opens, select the **Continue without code** link.
34+
35+
01. Select the **Extensions** > **Manage Extensions** menu to open the **Extension Manager** window.
36+
01. Select the **Browse** tab.
37+
01. Type **GitHub Copilot App Modernization** into the search box.
38+
01. Select the **GitHub Copilot App Modernization** item, and then select **Install**.
39+
40+
:::image type="content" source="media/github-copilot-app-modernization-install/visual-studio-manage-extensions.png" alt-text="The manage extensions window in Visual Studio, showing the GitHub Copilot App Modernization.":::
41+
42+
01. Once the extension finishes downloading, close Visual Studio to automatically start the installation.
43+
44+
:::image type="content" source="media/github-copilot-app-modernization-install/install-prompt.png" alt-text="A prompt to install the GitHub Copilot App Modernization extension.":::
45+
46+
01. Select **Modify** and follow the instructions to install the extension.
47+
48+
## Validation
49+
50+
The following information helps you determine that GitHub Copilot App Modernization is installed.
51+
52+
There are two ways to determine if GitHub Copilot App Modernization is installed as a Visual Studio extension. The quickest way is to right-click on any .NET or .NET Framework project in the **Solution Explorer** window and check for an **Upgrade** menu item.
53+
54+
Another way is to select the **Extensions** > **Manage Extensions** menu to open the **Extension Manager** window. Then, select the **Installed** tab and find it in the list of installed extensions.
55+
56+
## Related content
57+
58+
- [What is GitHub Copilot app modernization - upgrade for .NET?](github-copilot-app-modernization-overview.md)
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
title: GitHub Copilot app modernization - upgrade for .NET Overview
3+
description: "Learn more about GitHub Copilot app modernization - upgrade for .NET. This Visual Studio extension helps you upgrade your code and projects. Upgrades can include .NET versioning or migrating code from one technology to another."
4+
titleSuffix: ""
5+
author: adegeo
6+
ms.author: adegeo
7+
ms.topic: overview
8+
ms.date: 05/16/2025
9+
10+
#customer intent: As a developer, I want to upgrade my project so that I can take advantage of the latest features.
11+
12+
---
13+
14+
# What is GitHub Copilot app modernization - upgrade for .NET?
15+
16+
GitHub Copilot app modernization - upgrade for .NET is a powerful Visual Studio extension that works with you to upgrade projects to newer versions of .NET, upgrade your dependencies, and applies code fixes.
17+
18+
GitHub Copilot app modernization is distributed as a Visual Studio extension, and is an interactive upgrade process.
19+
20+
## Prerequisites
21+
22+
- Windows Operating System
23+
- [Visual Studio 2022 version 17.14 or newer](https://visualstudio.microsoft.com/downloads/).
24+
- [.NET desktop development workload](/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#change-workloads-or-individual-components).
25+
- [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).
26+
- You can use [GitHub Copilot for free](/visualstudio/ide/copilot-free-plan).
27+
- Code must be in a local Git repository.
28+
- Code must be written in C#.
29+
- Optional but recommended: Use **GitHub Copilot agent mode** for the upgrade process. For more information, see [Use Copilot agent mode in Visual Studio](/visualstudio/ide/copilot-agent-mode?view=vs-2022&preserve-view=true).
30+
31+
For installation instructions, see [Install GitHub Copilot app modernization - upgrade for .NET](github-copilot-app-modernization-install.md).
32+
33+
## Supported project types
34+
35+
GitHub Copilot app modernization supports upgrading projects coded in C#. The following types of projects are supported:
36+
37+
- ASP.NET and related technologies such as MVC, Razor Pages, Web API
38+
- Blazor
39+
- Azure Functions
40+
- Windows Presentation Foundation
41+
- Windows Forms
42+
- Class libraries
43+
- Console apps
44+
45+
> [!IMPORTANT]
46+
> The current version of the extension doesn't support upgrading from .NET Framework to .NET. In these scenarios, use the [.NET Upgrade Assistant](upgrade-assistant-overview.md) to migrate to .NET, then use this tool to modernize your code.
47+
48+
## Upgrade paths
49+
50+
The following upgrade paths are supported:
51+
52+
- Upgrade projects from .NET Core to .NET.
53+
- Upgrade projects from older versions of .NET to the latest.
54+
- Modernize your code base.
55+
56+
## Start the upgrade process
57+
58+
The first step to upgrading is generating a plan by interacting with GitHub Copilot. There are two ways to get Copilot to use the tool:
59+
60+
- Right-click on the solution or project and select **Upgrade with GitHub Copilot**.
61+
62+
—or—
63+
64+
- [Enable GitHub Copilot agent mode](/visualstudio/ide/copilot-agent-mode?view=vs-2022&preserve-view=true), and ask a new Copilot chat to upgrade the solution or project.
65+
66+
> [!IMPORTANT]
67+
> After enabling GitHub Copilot agent mode, set the chat mode to **Agent** and enable the **upgrade_start** tool.
68+
>
69+
> :::image type="content" source="media/github-copilot-app-modernization-overview/copilot-agent-tools.png" alt-text="The GitHub Copilot chat window. The Agent Mode dropdown and Tool selection dropdown are both highlighted.":::
70+
71+
## Generate a plan
72+
73+
Once the process starts, Copilot analyzes your projects and their dependencies, and then asks you a series of questions about the upgrade. After you answer these questions, an upgrade plan is written in the form of a markdown file. If you tell Copilot to proceed with the upgrade, this plan describes the steps of the upgrade process.
74+
75+
You can adjust the plan by editing the markdown file to change the upgrade steps or add more context.
76+
77+
> [!CAUTION]
78+
> The plan is generated based on the inter-dependencies of your projects. You can prevent the upgrade from succeeding if you modify the plan in such a way that the migration path can't complete. For example, if **Project A** depends on **Project B** and you remove **Project B** from the upgrade plan, upgrading **Project A** might fail.
79+
80+
The following snippet demonstrates the structure of a plan:
81+
82+
```md
83+
# .NET 9.0 Upgrade Plan
84+
85+
## Execution Steps
86+
87+
1. Validate that an .NET 9.0 SDK required for this upgrade is installed on the machine and if not, help to get it installed.
88+
2. Ensure that the SDK version specified in global.json files is compatible with the .NET 9.0 upgrade.
89+
3. Upgrade projects to .NET 9.0.
90+
- 3.1. Upgrade RazorMovie.csproj
91+
- 3.2. Upgrade RazorMovie.Tests.csproj
92+
4. Run unit tests to validate upgrade in the projects listed below:
93+
- RazorMovie.Tests.csproj
94+
95+
## Settings
96+
97+
This section contains settings and data used by execution steps.
98+
99+
### Aggregate NuGet packages modifications across all projects
100+
101+
NuGet packages used across all selected projects or their dependencies that need version update in projects that reference them.
102+
103+
| Package Name | Current Version | New Version | Description |
104+
|:-------------------------------------------------|:-------------------:|:-----------:|:-------------------------|
105+
| HtmlSanitizer | 7.1.542 | 9.0.884 | Security vulnerability |
106+
| Microsoft.Data.SqlClient | 4.0.5 | 6.0.2 | Deprecated |
107+
| Microsoft.EntityFrameworkCore.Design | 6.0.0-rtm.21467.1 | 9.0.5 | Recommended for .NET 9.0 |
108+
| Microsoft.EntityFrameworkCore.SqlServer | 6.0.0-rc.1.21452.10 | 9.0.5 | Recommended for .NET 9.0 |
109+
| Microsoft.EntityFrameworkCore.Tools | 6.0.0-rc.1.21452.10 | 9.0.5 | Recommended for .NET 9.0 |
110+
| Microsoft.VisualStudio.Web.CodeGeneration.Design | 6.0.0-rc.1.21464.1 | 9.0.0 | Recommended for .NET 9.0 |
111+
112+
...
113+
```
114+
115+
## Perform the upgrade
116+
117+
Once an upgrade plan is ready, tell the Copilot to start the upgrade. Once the upgrade process starts, Copilot lets you know what it's doing in the chat window and it opens the **Upgrade Progress Details** document, which lists the status of every step. If it runs into a problem, Copilot pauses and asks for your direction or help in fixing these problems.
118+
119+
The tool differs in experience based on whether or not Copilot _agent mode_ is enabled.
120+
121+
- **Copilot agent mode**
122+
123+
When Copilot agent mode is enabled and used, Copilot tries to identify the cause of a problem and apply a fix. If Copilot can't seem to correct the problem, it asks for your help. When you intervene, Copilot learns from the changes you make and tries to automatically apply them for you, if the problem is encountered again.
124+
125+
- **Copilot fix mode**
126+
127+
Copilot fix mode is used if agent mode is disabled or not used. Copilot reports the problems it finds and guides you through the fixes required. It relies on you to perform the actual code changes and then it verifies those fixes.
128+
129+
Each major step in the upgrade process is committed to the local Git repository.
130+
131+
## Upgrade results
132+
133+
When the upgrade completes, a report is generated that describes every step of the upgrade. The tool creates a Git commit for every portion of the upgrade process, so you can easily roll back the changes or get detailed information about what changed. The report contains the Git commit hashes.
134+
135+
The report also provides a _Next steps_ section that describes the steps you should take after the upgrade finishes. The following example shows the report of a completed upgrade that contained a test failure:
136+
137+
```md
138+
# .NET 9 Upgrade Report
139+
140+
## Project modifications
141+
142+
| Project name | Old Target Framework | New Target Framework | Commits |
143+
|:-----------------------------------------------|:-----------------------:|:----------------------------:|---------------------------|
144+
| RazorMovie | net6.0 | net9.0 | af8cf633, aa61a18d |
145+
| MvcMovie | net6.0 | net9.0 | cc8c9015 |
146+
| WpfMovie | net6.0-windows | net9.0-windows | 9c4b13f9 |
147+
| RazorMovie.Tests | net6.0 | net9.0 | b8d85e97 |
148+
| MvcMovie.Tests | net6.0 | net9.0 | b8d85e97 |
149+
| WpfMovie.Tests | net6.0-windows | net9.0-windows7.0 | b8d85e97 |
150+
151+
## NuGet Packages
152+
153+
| Package Name | Old Version | New Version | Commit Id |
154+
|:-------------------------------------------------|:-------------------:|:-----------:|-----------|
155+
| HtmlSanitizer | 7.1.542 | 9.0.884 | af8cf633 |
156+
| Microsoft.Data.SqlClient | 4.0.5 | 6.0.2 | bf8deeac |
157+
| Microsoft.EntityFrameworkCore.Design | 6.0.0-rtm.21467.1 | 9.0.5 | bf8deeac |
158+
| Microsoft.EntityFrameworkCore.SqlServer | 6.0.0-rc.1.21452.10 | 9.0.5 | bf8deeac |
159+
| Microsoft.EntityFrameworkCore.Tools | 6.0.0-rc.1.21452.10 | 9.0.5 | bf8deeac |
160+
| Microsoft.VisualStudio.Web.CodeGeneration.Design | 6.0.0-rc.1.21464.1 | 9.0.0 | bf8deeac |
161+
162+
## All commits
163+
164+
| Commit ID | Description |
165+
|:----------|:--------------------------------------------------------|
166+
| af8cf633 | Update HtmlSanitizer package in RazorMovie.csproj |
167+
| aa61a18d | Upgrade target framework in RazorMovie.csproj |
168+
| cc8c9015 | Upgrade to .NET 9 and update dependencies |
169+
| bf8deeac | Update package references in MvcMovie.csproj |
170+
| 9c4b13f9 | Update WpfMovie.csproj to target .NET 9.0 |
171+
| b8d85e97 | Update test projects to .NET 9 and enhance dependencies |
172+
173+
## Test Results
174+
175+
| Project Name | Passed | Failed | Skipped |
176+
|:-----------------------|:------:|:------:|:-------:|
177+
| RazorMovie.Tests | 0 | 0 | 0 |
178+
| MvcMovie.Tests | 2 | 0 | 0 |
179+
| WpfMovie.Tests | 6 | 1 | 0 |
180+
181+
## Next steps
182+
183+
- Review the test results and address the single failing test in `WpfMovie.Tests`.
184+
- Ensure all updated NuGet packages are compatible with your application.
185+
- Leverage new features and improvements in .NET 9.0 for your projects.
186+
```
187+
188+
## Telemetry
189+
190+
The tool only collects data about project types, intent to upgrade, and upgrade duration. The data is collected and aggregated through Visual Studio itself and doesn't contain any user-identifiable information. For more information about Microsoft's privacy policy, see [Visual Studio Customer Experience Improvement Program](/visualstudio/ide/visual-studio-experience-improvement-program?view=vs-2022&preserve-view=true).
191+
192+
## Related content
193+
194+
- [Install GitHub Copilot app modernization - upgrade for .NET](github-copilot-app-modernization-install.md)
195+
- [GitHub Copilot app modernization - upgrade for .NET FAQ](github-copilot-app-modernization-faq.yml)
17.1 KB
Loading
35.7 KB
Loading
20.1 KB
Loading

0 commit comments

Comments
 (0)