Skip to content

Commit 1590957

Browse files
committed
Add snippets back
1 parent fe51577 commit 1590957

File tree

1 file changed

+89
-1
lines changed

1 file changed

+89
-1
lines changed

docs/core/porting/how-to-upgrade-with-github-copilot.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: adegeo
55
ms.author: adegeo
66
ms.topic: how-to
77
ms.date: 09/15/2025
8-
ai-usage: ai-generated
8+
ai-usage: ai-assisted
99

1010
#customer intent: As a developer, I want to upgrade my .NET app using GitHub Copilot app modernization so that I can modernize my codebase efficiently with AI assistance.
1111

@@ -61,6 +61,41 @@ To generate and customize your plan:
6161
> [!CAUTION]
6262
> 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.
6363
64+
The following snippet demonstrates the structure of a plan:
65+
66+
```md
67+
# .NET 9.0 Upgrade Plan
68+
69+
## Execution Steps
70+
71+
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.
72+
2. Ensure that the SDK version specified in global.json files is compatible with the .NET 9.0 upgrade.
73+
3. Upgrade projects to .NET 9.0.
74+
- 3.1. Upgrade RazorMovie.csproj
75+
- 3.2. Upgrade RazorMovie.Tests.csproj
76+
4. Run unit tests to validate upgrade in the projects listed below:
77+
- RazorMovie.Tests.csproj
78+
79+
## Settings
80+
81+
This section contains settings and data used by execution steps.
82+
83+
### Aggregate NuGet packages modifications across all projects
84+
85+
NuGet packages used across all selected projects or their dependencies that need version update in projects that reference them.
86+
87+
| Package Name | Current Version | New Version | Description |
88+
|:-------------------------------------------------|:-------------------:|:-----------:|:-------------------------|
89+
| HtmlSanitizer | 7.1.542 | 9.0.884 | Security vulnerability |
90+
| Microsoft.Data.SqlClient | 4.0.5 | 6.0.2 | Deprecated |
91+
| Microsoft.EntityFrameworkCore.Design | 6.0.0-rtm.21467.1 | 9.0.5 | Recommended for .NET 9.0 |
92+
| Microsoft.EntityFrameworkCore.SqlServer | 6.0.0-rc.1.21452.10 | 9.0.5 | Recommended for .NET 9.0 |
93+
| Microsoft.EntityFrameworkCore.Tools | 6.0.0-rc.1.21452.10 | 9.0.5 | Recommended for .NET 9.0 |
94+
| Microsoft.VisualStudio.Web.CodeGeneration.Design | 6.0.0-rc.1.21464.1 | 9.0.0 | Recommended for .NET 9.0 |
95+
96+
...
97+
```
98+
6499
## Perform the upgrade
65100

66101
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.
@@ -71,6 +106,59 @@ Each major step in the upgrade process is committed to the local Git repository.
71106

72107
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 and provides a _Next steps_ section that describes the steps you should take after the upgrade finishes.
73108

109+
The following example shows the report of a completed upgrade that contained a test failure:
110+
111+
```md
112+
# .NET 9 Upgrade Report
113+
114+
## Project modifications
115+
116+
| Project name | Old Target Framework | New Target Framework | Commits |
117+
|:-----------------------------------------------|:-----------------------:|:----------------------------:|---------------------------|
118+
| RazorMovie | net6.0 | net9.0 | af8cf633, aa61a18d |
119+
| MvcMovie | net6.0 | net9.0 | cc8c9015 |
120+
| WpfMovie | net6.0-windows | net9.0-windows | 9c4b13f9 |
121+
| RazorMovie.Tests | net6.0 | net9.0 | b8d85e97 |
122+
| MvcMovie.Tests | net6.0 | net9.0 | b8d85e97 |
123+
| WpfMovie.Tests | net6.0-windows | net9.0-windows7.0 | b8d85e97 |
124+
125+
## NuGet Packages
126+
127+
| Package Name | Old Version | New Version | Commit Id |
128+
|:-------------------------------------------------|:-------------------:|:-----------:|-----------|
129+
| HtmlSanitizer | 7.1.542 | 9.0.884 | af8cf633 |
130+
| Microsoft.Data.SqlClient | 4.0.5 | 6.0.2 | bf8deeac |
131+
| Microsoft.EntityFrameworkCore.Design | 6.0.0-rtm.21467.1 | 9.0.5 | bf8deeac |
132+
| Microsoft.EntityFrameworkCore.SqlServer | 6.0.0-rc.1.21452.10 | 9.0.5 | bf8deeac |
133+
| Microsoft.EntityFrameworkCore.Tools | 6.0.0-rc.1.21452.10 | 9.0.5 | bf8deeac |
134+
| Microsoft.VisualStudio.Web.CodeGeneration.Design | 6.0.0-rc.1.21464.1 | 9.0.0 | bf8deeac |
135+
136+
## All commits
137+
138+
| Commit ID | Description |
139+
|:----------|:--------------------------------------------------------|
140+
| af8cf633 | Update HtmlSanitizer package in RazorMovie.csproj |
141+
| aa61a18d | Upgrade target framework in RazorMovie.csproj |
142+
| cc8c9015 | Upgrade to .NET 9 and update dependencies |
143+
| bf8deeac | Update package references in MvcMovie.csproj |
144+
| 9c4b13f9 | Update WpfMovie.csproj to target .NET 9.0 |
145+
| b8d85e97 | Update test projects to .NET 9 and enhance dependencies |
146+
147+
## Test Results
148+
149+
| Project Name | Passed | Failed | Skipped |
150+
|:-----------------------|:------:|:------:|:-------:|
151+
| RazorMovie.Tests | 0 | 0 | 0 |
152+
| MvcMovie.Tests | 2 | 0 | 0 |
153+
| WpfMovie.Tests | 6 | 1 | 0 |
154+
155+
## Next steps
156+
157+
- Review the test results and address the single failing test in `WpfMovie.Tests`.
158+
- Ensure all updated NuGet packages are compatible with your application.
159+
- Leverage new features and improvements in .NET 9.0 for your projects.
160+
```
161+
74162
## Next steps
75163

76164
After completing the upgrade process:

0 commit comments

Comments
 (0)