Skip to content

Commit 8f51746

Browse files
Merge pull request #6230 from MicrosoftDocs/main
Auto Publish – main to live - 2026-01-27 18:30 UTC
2 parents 5314a60 + bdd92ee commit 8f51746

8 files changed

Lines changed: 107 additions & 4 deletions

docs/build-insights/build-performance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The GitHub Copilot build performance for Windows helps you make your builds fast
1414

1515
- Visual Studio 2026 version 18.3 Insiders 4, or later.
1616
- MSVC Build Tools version 14.50 or later.
17-
- A MSBuild or CMake project.
17+
- An MSBuild or CMake project.
1818
- Windows 10 or later.
1919

2020
### Before you begin 
@@ -33,7 +33,7 @@ Verify your GitHub Copilot subscription on GitHub, and then sign in to your GitH
3333

3434
1. Verify your GitHub Copilot subscription by signing in to [https://github.com](https://github.com/). Select your profile picture and then [Copilot settings](https://github.com/settings/copilot/features). Your plan type appears near the top of the page:
3535

36-
:::image type="complex" source="./media/copilot-subscription.png" alt-text="Screenshot of the users GitHub Copilot information.":::
36+
:::image type="complex" source="./media/copilot-subscription.png" alt-text="Screenshot showing the user's GitHub Copilot information.":::
3737
The Copilot settings page shows the type of subscription. In this case, the user has GitHub Copilot Enterprise.
3838
:::image-end:::
3939
1. In Visual Studio, sign in to your GitHub account:
@@ -71,7 +71,7 @@ To start the GitHub Copilot build performance agent:
7171
1. Select your preferred model in the model drop down menu:
7272

7373
:::image type="complex" source="./media/model-select.png" alt-text="Screenshot of the model selection menu in the Copilot Chat window.":::
74-
This dropdown lists models various models like GPT-5, CLaude Sonnet 4, Gemini 3 Pro, and others.
74+
This dropdown lists various models like GPT-5, CLaude Sonnet 4, Gemini 3 Pro, and others.
7575
:::image-end:::
7676

7777
1. Instruct GitHub Copilot to improve the build performance of your selected project by typing something like **Help me improve the build performance of this project**. You can add extra context so that GitHub Copilot can better make suggestions to match the needs of your project.
@@ -104,7 +104,7 @@ Choose **Yes**. The Windows User Account Control dialog then appears:
104104
The dialog asks for permission for the Windows Command Processor, verified publisher Microsoft, to allow this app to make changes to your device. There are Yes and No buttons.
105105
:::image-end:::
106106

107-
Choose **Yes** to grant permission to capture the MSVC compiler traces. Denying the elevated request to cancel the build analysis.
107+
Choose **Yes** to grant permission to capture the MSVC compiler traces. Denying the elevated request cancels the build analysis.
108108

109109
## Guide GitHub Copilot through the process of improving the build time
110110

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: "Modernize your C++ project with GitHub Copilot app modernization"
3+
description: "Instructions on effectively using GitHub Copilot app modernization in your C++ projects"
4+
ms.date: 01/23/2026
5+
ms.topic: upgrade-and-migration-article
6+
author: michaelbprice
7+
ms.author: miprice
8+
---
9+
10+
# Using GitHub Copilot app modernization for C++
11+
12+
GitHub Copilot app modernization for C++ helps you upgrade C++ projects to newer MSVC Build Tools versions. If necessary, Copilot will upgrade your project's settings to use the latest MSVC, and then conduct a thorough assessment of the impact of those changes after executing a build. It develops a plan on how to address each identified problem. Once you approve the plan, the agent completes a sequence of tasks and validates that any changes resolved the identified problems. If there remains work to be done, the agent continues iterating until the problems are resolved or you discontinue the conversation.
13+
14+
> [!NOTE]
15+
> GitHub Copilot app modernization for C++ is currently in preview.
16+
17+
## Requirements
18+
19+
- Visual Studio 2026 version 18.3 or later
20+
- A GitHub Copilot account
21+
- A MSBuild-based codebase (`.sln`, `.vcxproj`) OR a CMake-based codebase
22+
23+
## Enable GitHub Copilot app modernization for C++
24+
25+
GitHub Copilot app modernization for C++ is enabled by default. To disable or explicitly enable the feature, follow these steps.
26+
27+
1. From Visual Studio, select **Tools > Options...** to open the **Options** window.
28+
1. Navigate to **All Settings > GitHub > Copilot > C/C++**.
29+
1. Select (to enable) or clear (to disable) the checkbox for **Enable GitHub Copilot app modernization for C++ (preview)**.
30+
1. Restart Visual Studio for the setting change to take effect.
31+
32+
![Screenshot of the settings to enable GitHub Copilot app modernization for C++.](media/enable-copilot-app-modernization-cpp.png "enable GitHub Copilot app modernization for C++")
33+
34+
## Upgrade your codebase by using GitHub Copilot app modernization for C++
35+
36+
This section describes how to start the Modernize agent and the stages it goes through to upgrade your codebase.
37+
38+
### Start the Modernize agent
39+
40+
GitHub Copilot app modernization is an agent that operates inside the GitHub Copilot Chat window. You can start the agent in any of the following ways:
41+
42+
- **From the Solution Explorer context menu**: Right-click on the solution or a loaded project in the Solution Explorer, and choose **Modernize** from the context menu. This automatically launches a GitHub Copilot Chat window, activates the Modernize agent, and provides you with relevant prompts to choose from to get you started.
43+
44+
![Screenshot of the context menu to start GitHub Copilot app modernization.](media/copilot-app-modernization-context-menu.png "Start GitHub Copilot app modernization")
45+
46+
- **From GitHub Copilot Chat**: Open the GitHub Copilot Chat Window by selecting **View > GitHub Copilot Chat**. After the GitHub Copilot Chat window opens, mention `@Modernize` in a prompt to activate the Modernize agent. For example, type this prompt:
47+
48+
`Use @Modernize to update MSVC Build Tools.`
49+
50+
#### For MSBuild-based codebases targeting an earlier version of MSVC Build Tools
51+
52+
The first time that you load a `.vcxproj` project that targets an earlier version of the MSVC Build Tools, you see an option to [upgrade project settings to use a newer version of the MSVC Build Tools](https://learn.microsoft.com/visualstudio/install/setup-assistant). If you retarget any of your projects to a new version of MSVC Build Tools and GitHub Copilot app modernization for C++ is enabled, you receive an infobar in Visual Studio prompting you to use GitHub Copilot app modernization for C++ to resolve any newly introduced build problems. Selecting **Run GitHub Copilot app modernization for C++** launches the GitHub Copilot Chat window, activates the Modernize agent, and provides you with relevant prompts to choose from to get you started.
53+
54+
### Start the upgrade
55+
56+
Once the Modernize agent is active, you can instruct it via a prompt to upgrade your MSVC Build Tools, or select the already constructed prompt from the list shown in the window. If you launched the agent directly in the GitHub Copilot Chat window by mentioning @Modernize in your prompt, you probably don't need to provide any additional prompting.
57+
58+
:::row:::
59+
:::column:::
60+
61+
**MSBuild Projects**
62+
63+
:::column-end:::
64+
:::column:::
65+
66+
**CMake Projects**
67+
68+
:::column-end:::
69+
:::row-end:::
70+
:::row:::
71+
:::column:::
72+
73+
![Screenshot of GitHub Copilot app modernization window with MSVC upgrade ice breaker for an MSBuild project.](media/app-modernization-msbuild-ice-breaker.png "GitHub Copilot app modernization window")
74+
75+
:::column-end:::
76+
:::column:::
77+
78+
![Screenshot of GitHub Copilot app modernization window with MSVC upgrade ice breaker for a CMake project.](media/app-modernization-cmake-ice-breaker.png "GitHub Copilot app modernization window")
79+
80+
:::column-end:::
81+
:::row-end:::
82+
83+
84+
### Assessment stage
85+
86+
The agent first assesses what kinds of problems show up after upgrading. If you didn't already upgrade the project, the agent guides you through that process before creating its assessment. After ensuring that your project is upgraded, the agent builds your codebase, analyzes the reported warnings and errors, and generates an `assessment.md` file that describes the problems that it found, their severity, and other useful information. This is your opportunity to tell the agent any additional context that could help it make a plan.
87+
88+
One of the things you might choose to do here is to tell the agent not to fix certain discovered problems, because you know that resolving them involves some strategic decisions or because they were preexisting warnings that you decided are acceptable for your project. You should carefully read through the plan, making sure to provide that additional context where it is needed. Once you approve the assessment, the agent moves on to creating a concrete plan on addressing the problems.
89+
90+
### Planning stage
91+
92+
Based on the approved assessment and any additional context or instructions you provide, the agent creates a `plan.md` file that proposes a detailed plan for resolving each of the identified problems. If the agent produces a plan that doesn't match your organization's coding style or practices, you can provide that guidance to the agent and have it solve the problem differently. After you agree on the plan, the agent moves to the execution stage.
93+
94+
### Execution stage
95+
96+
Now that the agent has a plan, it breaks down the necessary tasks to execute the plan. You can define these tasks as finely as you want. The tasks can even include steps to work on a branch or to commit specific changes together in the same commit. After making any changes, the agent builds the project again to confirm that the problems are resolved. If the problems aren't resolved, the agent iterates with you until they're resolved to your satisfaction.
97+
98+
### Post-upgrade validation
99+
100+
When the agent finishes, run the changes through any testing infrastructure you have. Have a colleague review the changes in a pull request. Since this feature is currently in preview, you might receive an infobar to complete a product survey to let the product team know how the agent performed on your codebase. The product team looks forward to hearing how they can improve the agent to solve your problems and accelerate your upgrade and modernization efforts.
188 KB
Loading
90.2 KB
Loading
49.1 KB
Loading
57.9 KB
Loading

docs/porting/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ items:
99
href: ../porting/overview-of-potential-upgrade-issues-visual-cpp.md
1010
- name: Upgrade your code to the Universal CRT
1111
href: ../porting/upgrade-your-code-to-the-universal-crt.md
12+
- name: Modernize your C++ project with GitHub Copilot app modernization
13+
href: ../porting/copilot-app-modernization-cpp.md
1214
- name: Update WINVER and _WIN32_WINNT
1315
href: ../porting/modifying-winver-and-win32-winnt.md
1416
- name: Fix your dependencies on library internals

docs/porting/visual-cpp-porting-and-upgrading-guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ ms.author: twhitney
6161

6262
- [⬆️ Upgrading C++ Projects to Visual Studio 2026](https://devblogs.microsoft.com/cppblog/upgrading-c-projects-to-visual-studio-2026/)
6363
- [⬆️ Upgrade projects from earlier versions](upgrading-projects-from-earlier-versions-of-visual-cpp.md)
64+
- [🤖 Upgrade with an AI agent (preview)](copilot-app-modernization-cpp.md)
6465
- [🛠️ IDE tools for upgrading C++ code](ide-tools-for-upgrading-code.md)
6566
- [🔄 Upgrade to Universal CRT](upgrade-your-code-to-the-universal-crt.md)
6667
- [🔧 Update WINVER and _WIN32_WINNT](modifying-winver-and-win32-winnt.md)

0 commit comments

Comments
 (0)