Upgrade Legacy .NET to .NET 10 with Copilot Agents in VS Code
GitHub Copilot Modernization extension and CLI use AI agents to assess, plan, and upgrade .NET Framework apps to .NET 10 in minutes, handling deps like MSMQ and Entity Framework—replacing weeks of manual work.
Legacy .NET Modernization: From Tedious Weeks to AI-Assisted Minutes
Jorge Balderas and Joel Norman demo modernizing the Contoso University app—a 15-year-old .NET Framework site with outdated tech like MSMQ (deprecated messaging), Global.asax, and old Entity Framework. Running in Visual Studio, it loads slowly and uses unsupported patterns post-upgrade. Jorge shares his consulting days: "I used to do a lot of upgrade projects both in .NET and Java. Uh they were not fun projects. Uh to be honest, there were a lot of repetitions, but there were some unique challenges in them. Um and yeah, this is something that would take, you know, weeks if not months." They enroll Joel in the fictional university via the app, add courses like "Vibing Capstone" and ".NET Modernization," and hire "Professor Holland"—lighthearted demos highlighting CRUD basics before upgrade.
The goal: Upgrade to .NET 10 without full rearchitecture, removing blockers like MSMQ (replaced by in-memory queuing or Azure Service Bus) and converting to SDK-style projects. Performance improves noticeably post-upgrade. Joel notes: "We're not going to show the modernize CLI, but it's yet another option. This will do batch assessments and batch upgrades for you."
GitHub Copilot Modernization Tools: Extension, CLI, and Cloud Agents
VS Code Extension Setup and Demo Jorge installs the GitHub Copilot Modernization extension (search "Copilot Modernization"), selects the ".NET Modernize" agent (also supports Java), picks Claude Opus (or GPT-4o, Gemini), enables Autopilot mode (auto-decides inputs), and prompts: "Upgrade my project to .NET 10. Commit changes to 'VSCodeLive'." The agent assesses the app, summarizes changes (e.g., package upgrades), generates a plan with options (single vs. multiple commits), and executes—handling SDK conversion, MSMQ removal, SQL client migration, MVC upgrades.
Without Autopilot, users review/edit the plan. It uses Copilot MCP for skills (81+ for .NET: Entity Framework upgrades, ASP.NET MVC). View skills via agent chat: "What skills are available for .NET upgrade?" Source in https://github.com/dotnet/modernize-dotnet changelog lists scenarios like Global.asax removal.
Copilot CLI Parallel Run
Joel runs in parallel (separate clones): Install plugin via gh copilot plugin marketplace, gh copilot plugin install modernize-dotnet, then gh copilot agent --model modernize-dotnet with same prompt/Autopilot. Processes identically, enabling all options.
Cloud Agent on GitHub Jorge forks https://github.com/Azure-Samples/dotnet-migration-copilot-samples, creates custom agent in repo, uses GPT-4o: Spins up GitHub-hosted runner for compilation/testing. Prefixes branch as "copilot/CCA-live." View progress in GitHub UI.
All converge on runnable .NET 10 app. Jorge: "Now you can move them up to core. You can modernize them pretty quick."
Under the Hood: Agents, Skills, and Iteration
Powered by .NET Modernize agent plugin (open-source: https://github.com/dotnet/modernize-dotnet). Generic instructions load scenario-specific skills via Copilot MCP tools. Supports Azure-friendly upgrades (e.g., deployable to Azure). Customize: Provide skills in prompt/repo, swap MSMQ for Azure Service Bus.
Not fully autonomous—engineers iterate: Review plans, tweak packages/APM integration, test. Joel: "This isn't going to be magic magic where we just do kotis upgrade us. Um, there is still work an engineer needs to do like... pick the right upgrade path."
Supersedes older .NET Upgrade Assistant extension (Copilot-powered yields better results). Works in Visual Studio: Built-in Copilot Chat selects ".NET Modernize" agent, same prompt/process.
Batch via Modernize CLI (modernize command, GitHub Copilot CLI + GH CLI underneath). Docs: https://learn.microsoft.com/azure/developer/github-copilot-app-modernization/, https://dotnet.microsoft.com/platform/modernize.
Trade-offs and Real-World Wins
Speeds upgrades from story-point-heavy sprints ("15 story points just to get this set up") to 20 minutes live. Handles repetition (usings, library mappings), frees time for architecture. Risks: Autopilot assumes decisions; lag/internet hiccups (live demo quirks). Still needs validation.
Joel: "Really putting joy back into software engineering because modernizing is actually a lot of fun. But converting all those using at the top, shout out to the .NET team."
Notable Quotes
- Jorge Balderas: "Back on my consulting days, I used to do a lot of upgrade projects... they were not fun projects... weeks if not months. Uh we're actually going to do it in... about 20 minutes."
- Joel Norman: "This isn't going to be magic... there is still work an engineer needs to do... but the modernization assistant will help us do that."
- Jorge Balderas: "What we're trying to show is something that used to be very hard to do. Well, not really hard, more tedious... a lot of probably a line of business apps out there that are sitting on .NET framework. Now you can move them up to core... pretty quick."
- Joel Norman: "Really putting joy back into software engineering... shout out to the .NET team. You know what using remain, what using go away, what libraries change and go. We map that all out for you."
Key Takeaways
- Install GitHub Copilot Modernization VS Code extension; select ".NET Modernize" agent, use Autopilot + simple prompt like "Upgrade to .NET 10" for fast starts.
- Review agent plans/options (e.g., commit strategy) before execution; iterate for custom needs like Azure Service Bus over in-memory queuing.
- Parallel tools: VS Code extension, Copilot CLI (
gh copilot agent), GitHub Cloud Agent (fork repo, custom YAML), Visual Studio Copilot Chat—all share .NET Modernize plugin. - Check https://github.com/dotnet/modernize-dotnet for 81+ skills (MSMQ, EF, SDK-style); extend with custom prompts or skills.
- Test post-upgrade: Expect perf gains, but validate deps/APM; supersedes old Upgrade Assistant.
- For batches: Use Modernize CLI; start with samples at https://github.com/Azure-Samples/dotnet-migration-copilot-samples.
- Engineer oversight essential: AI handles tedium, you guide paths and verify.