Skip to main content

Taking GitHub Copilot's .NET Upgrade Assistant for a spin: AI-Powered Modernization

If you're like most developers, you probably don't get excited about upgrading legacy applications (at least I don't) . The process is traditionally time-consuming, risky, and filled with tedious manual work. But Microsoft has recently released something that could change that experience entirely: the GitHub Copilot app modernization – Upgrade for .NET extension, now in public preview.

What is it?

The sales pitch is that is more than just an upgrade tool—it's an AI-powered upgrade companion that leverages GitHub Copilot and Visual Studio's new Agent Mode to intelligently modernize your .NET applications. Think of it as having an experienced developer sitting beside you, understanding your codebase, planning the upgrade path, and making changes while keeping you in the loop when critical decisions need to be made.

It promises an intelligent approach to the upgrade process using the following techniques:

Dependency-aware planning

Instead of blindly upgrading projects, the tool analyzes your entire solution and creates a smart upgrade plan. If Project A depends on Project B, it automatically sequences the upgrades in the correct order. No more dependency hell.

Learning capabilities

Here's where it gets really interesting: when you manually fix something the AI couldn't handle, it should learn from your intervention. If it encounters the same issue later in the upgrade process, it applies your solution automatically. Your manual fixes make the entire upgrade smarter.

Git integration by default

The tool automatically creates Git commits throughout the process, so you can review, test, and adopt changes incrementally. This means you're never stuck with a broken solution—you can always roll back to any point in the upgrade process.

Sounds promising? Let’s give it a try…

Installation and setup

Before diving in, here's what you'll need:

  • Visual Studio 2022
  • A GitHub Copilot subscription (Pro, Pro+, Business, or Enterprise)
  • Git-based repository

The tool supports a wide range of project types including WPF, WinForms, Console applications, Class Libraries, Web projects (MVC, Blazor, Razor Pages, Web API), Azure Functions, and various test frameworks.

The next steps are straightforward:

  • Install the Extension: Download it from the Visual Studio Marketplace and run the installer.
  • Enable Agent Mode: This is where the magic happens. You'll need Visual Studio 17.14 and need to have Agent Mode active in the Copilot Chat settings
  • Select the Upgrade Tool: In Agent Mode, choose the "Upgrade" tool from the MCP tools selector
  • Start the upgrade: Right-click on your project or solution in Solution Explorer and select "Upgrade with GitHub Copilot"

Running the migration process

We are testing this on a limited set of applications to validate multiple scenarios. The first one should be an easy one. It is an ASP.NET Core Web application in .NET 8 that we want to upgrade to .NET 9. The domain is quite simple and we have a set of integration tests available in XUnit.

Let’s go!

  • The migration assistant starts by asking if we want to upgrade between .NET versions or update outdated packages. As I want to upgrade from .NET 8 to .NET 9 I reply with the first option.

 

  • It analyzes our project and asks the target FW. I’m already on .NET 8 so doesn’t make much sense to choose that option. We go for .NET 9.

 

  • Now it analyzes our Git repo and asks which branch we start the migration from. Master it is!

 

  • Next step is choose the target branch. It suggests a name but I like to put every change in a feature branch, so we’ll use features/net90.

 

  • The AI agent starts analyzing our project and returns a high level summary. Everything is looking good.

 

  • An upgrade plan is generated explaining all the steps it will take.
    • Remark: Don’t forget to save this plan!!

  • I noticed that some steps were missing. In this application we are still using the old Startup.cs bootstrapping. I asked to add a step to switch to the Program.cs Minimal API approach.

Let’s pause. This is the first time that the Upgrade wizard got stuck. It didn’t succeed in updating the generated plan but it came up with a suggestion on what I should add. I manually copied the suggested extra step over but unfortunately the agent refused to pick up again. where it had stopped.

I decided to leave the current Agent session and start a new upgrade.

  • The agent noticed that I already had an (updated) upgrade plan so I could continue with the existing plan.

 

  • I confirmed that it could start and it happily migrated my Infrastructure and Domain layer. After doing that it stopped, allowing me to validate the changes before continuing.

 

Although it seems a good idea to stop and allow me to validate during the migration process; it stopped at a moment when my application no longer compiled and my unit tests failed to run making it not that easy to confirm that the upgrade process was proceeding as expected.

This was also the time when I noticed that the Upgrade Progress Details remained very empty. Don”t know what is causing the problem but after closing the window I was not able to make it re-appear.

  • I asked it to continue and it continued until it arrived at the step I introduced myself; the switch from the Startup.cs to Program;cs.

 

  • Unfortunately it got stuck in doing the required changes so I had to update it manually.

  • After doing that the migration completed. The agent directly commits its changes so you can check the git history to see what changed exactly.

Final thoughts

The GitHub Copilot Upgrade Assistant sounds like a really compelling next step toward AI-assisted application modernization. The underlying concept is sound: let AI handle the repetitive, well-understood parts of upgrades while keeping humans in the loop for complex decisions.

Unfortunately, the tool seems far from mature as it got stuck on this rather simple application. It also failed to learn from my manual interventions, leaving a lot of work still for me.

However, as the tool matures, it could become an essential part of every .NET developer's toolkit. For now, it's an interesting experiment that shows us the future of application modernization—one where AI handles the grunt work, and developers focus on the decisions that matter.

But we are not there yet…

More information

GitHub Copilot app modernization - upgrade for .NET - Visual Studio Marketplace

Accelerate Your .NET Upgrades with GitHub Copilot - .NET Blog

Popular posts from this blog

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Col...