|
| 1 | +--- |
| 2 | +title: GitHub Copilot app modernization update example |
| 3 | +description: "some desc" |
| 4 | +titleSuffix: "" |
| 5 | +author: adegeo |
| 6 | +ms.author: adegeo |
| 7 | +ms.topic: concept-article |
| 8 | +ms.date: 09/04/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 | +# GitHub Copilot app modernization update example |
| 15 | + |
| 16 | +BLAH |
| 17 | + |
| 18 | +## Start the upgrade process |
| 19 | + |
| 20 | +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: |
| 21 | + |
| 22 | +- Right-click on the solution or project and select **Modernize**. |
| 23 | + |
| 24 | + ..TODO: IMAGE.. |
| 25 | + |
| 26 | + —or— |
| 27 | + |
| 28 | +- Open the **GitHub Copilot Chat** window and ask the `@Modernize` agent to upgrade. |
| 29 | + |
| 30 | +## Generate a plan |
| 31 | + |
| 32 | +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. |
| 33 | + |
| 34 | +You can adjust the plan by editing the Markdown file to change the upgrade steps or add more context. |
| 35 | + |
| 36 | +> [!CAUTION] |
| 37 | +> The plan is generated based on the inter-dependencies of your projects. The upgrade won't succeed 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. |
| 38 | +
|
| 39 | +The following snippet demonstrates the structure of a plan: |
| 40 | + |
| 41 | +```md |
| 42 | +# .NET 10.0 Upgrade Plan |
| 43 | + |
| 44 | +## Execution Steps |
| 45 | + |
| 46 | +1. Validate that an .NET 10.0 SDK required for this upgrade is installed on the machine and if not, help to get it installed. |
| 47 | +2. Ensure that the SDK version specified in global.json files is compatible with the .NET 10.0 upgrade. |
| 48 | +3. Upgrade projects to .NET 10.0. |
| 49 | + - 3.1. Upgrade RazorMovie.csproj |
| 50 | + - 3.2. Upgrade RazorMovie.Tests.csproj |
| 51 | +4. Run unit tests to validate upgrade in the projects listed below: |
| 52 | + - RazorMovie.Tests.csproj |
| 53 | + |
| 54 | +## Settings |
| 55 | + |
| 56 | +This section contains settings and data used by execution steps. |
| 57 | + |
| 58 | +### Aggregate NuGet packages modifications across all projects |
| 59 | + |
| 60 | +NuGet packages used across all selected projects or their dependencies that need version update in projects that reference them. |
| 61 | + |
| 62 | +| Package Name | Current Version | New Version | Description | |
| 63 | +|:-------------------------------------------------|:-------------------:|:-----------:|:-------------------------| |
| 64 | +| HtmlSanitizer | 7.1.542 | 9.0.884 | Security vulnerability | |
| 65 | +| Microsoft.Data.SqlClient | 4.0.5 | 6.0.2 | Deprecated | |
| 66 | +| Microsoft.EntityFrameworkCore.Design | 6.0.0-rtm.21467.1 | 9.0.5 | Recommended for .NET 10.0 | |
| 67 | +| Microsoft.EntityFrameworkCore.SqlServer | 6.0.0-rc.1.21452.10 | 9.0.5 | Recommended for .NET 10.0 | |
| 68 | +| Microsoft.EntityFrameworkCore.Tools | 6.0.0-rc.1.21452.10 | 9.0.5 | Recommended for .NET 10.0 | |
| 69 | +| Microsoft.VisualStudio.Web.CodeGeneration.Design | 6.0.0-rc.1.21464.1 | 9.0.0 | Recommended for .NET 10.0 | |
| 70 | + |
| 71 | +... |
| 72 | +``` |
| 73 | + |
| 74 | +## Perform the upgrade |
| 75 | + |
| 76 | +Once an upgrade plan is ready, tell 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. |
| 77 | + |
| 78 | +The tool differs in experience based on whether or not Copilot _agent mode_ is enabled. |
| 79 | + |
| 80 | +- **Copilot agent mode** |
| 81 | + |
| 82 | + 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. |
| 83 | + |
| 84 | +- **Copilot fix mode** |
| 85 | + |
| 86 | + 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. |
| 87 | + |
| 88 | +Each major step in the upgrade process is committed to the local Git repository. |
| 89 | + |
| 90 | +## Upgrade results |
| 91 | + |
| 92 | +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. |
| 93 | + |
| 94 | +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: |
| 95 | + |
| 96 | +```md |
| 97 | +# .NET 10 Upgrade Report |
| 98 | + |
| 99 | +## Project modifications |
| 100 | + |
| 101 | +| Project name | Old Target Framework | New Target Framework | Commits | |
| 102 | +|:-----------------------------------------------|:-----------------------:|:----------------------------:|---------------------------| |
| 103 | +| RazorMovie | net6.0 | net9.0 | af8cf633, aa61a18d | |
| 104 | +| MvcMovie | net6.0 | net9.0 | cc8c9015 | |
| 105 | +| WpfMovie | net6.0-windows | net9.0-windows | 9c4b13f9 | |
| 106 | +| RazorMovie.Tests | net6.0 | net9.0 | b8d85e97 | |
| 107 | +| MvcMovie.Tests | net6.0 | net9.0 | b8d85e97 | |
| 108 | +| WpfMovie.Tests | net6.0-windows | net9.0-windows7.0 | b8d85e97 | |
| 109 | + |
| 110 | +## NuGet Packages |
| 111 | + |
| 112 | +| Package Name | Old Version | New Version | Commit Id | |
| 113 | +|:-------------------------------------------------|:-------------------:|:-----------:|-----------| |
| 114 | +| HtmlSanitizer | 7.1.542 | 9.0.884 | af8cf633 | |
| 115 | +| Microsoft.Data.SqlClient | 4.0.5 | 6.0.2 | bf8deeac | |
| 116 | +| Microsoft.EntityFrameworkCore.Design | 6.0.0-rtm.21467.1 | 9.0.5 | bf8deeac | |
| 117 | +| Microsoft.EntityFrameworkCore.SqlServer | 6.0.0-rc.1.21452.10 | 9.0.5 | bf8deeac | |
| 118 | +| Microsoft.EntityFrameworkCore.Tools | 6.0.0-rc.1.21452.10 | 9.0.5 | bf8deeac | |
| 119 | +| Microsoft.VisualStudio.Web.CodeGeneration.Design | 6.0.0-rc.1.21464.1 | 9.0.0 | bf8deeac | |
| 120 | + |
| 121 | +## All commits |
| 122 | + |
| 123 | +| Commit ID | Description | |
| 124 | +|:----------|:--------------------------------------------------------| |
| 125 | +| af8cf633 | Update HtmlSanitizer package in RazorMovie.csproj | |
| 126 | +| aa61a18d | Upgrade target framework in RazorMovie.csproj | |
| 127 | +| cc8c9015 | Upgrade to .NET 9 and update dependencies | |
| 128 | +| bf8deeac | Update package references in MvcMovie.csproj | |
| 129 | +| 9c4b13f9 | Update WpfMovie.csproj to target .NET 10.0 | |
| 130 | +| b8d85e97 | Update test projects to .NET 9 and enhance dependencies | |
| 131 | + |
| 132 | +## Test Results |
| 133 | + |
| 134 | +| Project Name | Passed | Failed | Skipped | |
| 135 | +|:-----------------------|:------:|:------:|:-------:| |
| 136 | +| RazorMovie.Tests | 0 | 0 | 0 | |
| 137 | +| MvcMovie.Tests | 2 | 0 | 0 | |
| 138 | +| WpfMovie.Tests | 6 | 1 | 0 | |
| 139 | + |
| 140 | +## Next steps |
| 141 | + |
| 142 | +- Review the test results and address the single failing test in `WpfMovie.Tests`. |
| 143 | +- Ensure all updated NuGet packages are compatible with your application. |
| 144 | +- Leverage new features and improvements in .NET 10.0 for your projects. |
| 145 | +``` |
| 146 | + |
| 147 | +## Related content |
| 148 | + |
| 149 | +- [What is GitHub Copilot app modernization](github-copilot-app-modernization-overview.md) |
| 150 | +- [GitHub Copilot app modernization FAQ](github-copilot-app-modernization-faq.yml) |
| 151 | +- [Migrate to Azure with GitHub Copilot app modernization](/dotnet/azure/migration/appmod/overview) |
0 commit comments