You probably don’t look forward to the process of modernizing your applications. It can be time consuming, risky, and full of manual toil. Today we’re changing that.
We are thrilled to announce the public preview of GitHub Copilot app modernization – Upgrade for .NET, an AI-powered experience that helps you bring your .NET applications to the latest version quicker and more confidently than ever before. Powered by GitHub Copilot and Agent Mode, it serves as an intelligent upgrade companion that understands your code, determines the right upgrade path, and applies changes step by step with minimal manual effort.
How it Works
Upgrading a .NET app isn’t just about tweaking code – it’s about managing complexity. GitHub Copilot app modernization – Upgrade for .NET is built to do exactly that, combining automation with intelligence so you can modernize faster without losing control.
Here’s what happens:
1. Define Your Goal
Start by telling the GitHub Copilot what you want to do – like upgrading your entire solution to .NET 8. No need to go project-by-project.
2. Get a Smart Upgrade Plan
The tool analyzes your solution and generates a dependency-aware plan that upgrades projects in the right order. If Project A depends on Project B, it understands that and adjusts the sequence automatically.
3. Automate the Upgrade
The tool executes the upgrade based on the upgrade plan, rewriting code and applying changes on your behalf.
4. AI-Powered Guidance – with You in the Loop
When the AI hits a tricky part of your code, it doesn’t guess or fail silently. It prompts you to step in, makes it easy to resolve the issue, then picks up right where it left off.
Better yet, Copilot learns from your fixes. If it sees the same issue later in the upgrade, it applies the same solution automatically. Every manual fix makes your upgrade smarter and smoother.
5. Finalize and Run Tests
Once everything’s upgraded, the tool wraps up by suggesting any final or follow-up steps to get your app truly production-ready. If your projects have unit tests, they will be run at this point. The tool has been creating git commits on your behalf along the way, so be sure to review them before merging!
Bottom line: You get a guided, AI-powered experience that automates the boring parts, helps you navigate the tricky ones, and delivers a modern .NET app that’s ready to run.
What’s Included?
Automated code transformations: Copilot automatically makes the changes required to get your applications running on modern .NET.
Customizable workflows: You can tailor which projects to upgrade, whether to address packages with security vulnerabilities in your upgrade, and more.
Learning from your manual changes: When manual intervention is required, the tool can learn from your manual changes and apply those learnings if it encounters a similar situation later on in your upgrade.
Git Integration: Git commits are automatically created on your behalf so that you can adopt and test changes incrementally.
Automatic test validation: The tool automatically runs your application’s unit tests to ensure correct behavior post-upgrade.
Agent Mode functionality: Take advantage of Copilot Agent Mode with the latest preview version of Visual Studio installed.
How to Install the Tool
Getting started with GitHub Copilot app modernization – Upgrade for .NET is easy.
Step 1: Install the Extension
Head to the Visual Studio Marketplace and download the GitHub Copilot app modernization – Upgrade for .NET extension. Once installed, you’re ready to use the tool.
Step 2 (Highly Recommended): Use Copilot Agent Mode
To unlock the full power of AI-assisted upgrades, install the latest version of Visual Studio 17.14 and sign-in to a GitHub account with an active Copilot subscription.
i. Ensure you have agent mode enabled: In Visual Studio, go to Tools > Options > GitHub > Copilot > Copilot Chat
and select “Enable agent mode in the chat pane.”
ii. Turn on Agent Mode: To get started, open the GitHub Copilot Chat window, click the “Ask” button, then click “Agent”. This turns on Copilot Agent Mode, which gives you a smarter, more natural way to run the tool.
iii. Select the Upgrade Tool: Once in Copilot Agent Mode, be sure to select the “Upgrade” tool from the Copilot Chat Tool Selector. Otherwise, Agent Mode won’t be able to call our upgrade tool.
For more information on Agent Mode, check out our blog on the topic.
How to Run the Upgrade
You’ve got two options:
- Right-click your project or solution in Solution Explorer and select “Upgrade with GitHub Copilot”
- Or, just tell Copilot what you want to do in the chat:
“Upgrade my solution to .NET 8”
That’s it. The tool gets to work analyzing your code, preparing the upgrade, and helping Copilot guide you through code changes.
Share Feedback
Your feedback is crucial to us as we aim to improve the product during this public preview. To share feedback with the team, please utilize the “Leave Feedback” feature in the upper right corner of the tool’s Upgrade Manager UX in Visual Studio.
We also welcome feedback via email to ghcpuacusteng@microsoft.com, as well as direct responses to our feedback survey.
The post Accelerate Your .NET Upgrades with GitHub Copilot appeared first on .NET Blog.