In this article, McKenna Barlow introduces the public preview of GitHub Copilot app modernization – Upgrade for .NET, detailing how developers can upgrade applications with AI-assisted tools in Visual Studio.

Faster .NET Upgrades Powered by GitHub Copilot

Author: McKenna Barlow

Introduction

Upgrading and modernizing .NET applications has long been a time-consuming and risky endeavor. To address this, GitHub has launched the public preview of GitHub Copilot app modernization – Upgrade for .NET, a new AI-powered solution designed to streamline and automate the upgrade process directly within Visual Studio.

Overview of GitHub Copilot app modernization – Upgrade for .NET

GitHub Copilot app modernization – Upgrade for .NET leverages the AI capabilities of GitHub Copilot and its Agent Mode to serve as an intelligent companion for upgrading .NET projects. The tool analyzes your application’s codebase, determines upgrade paths, applies code changes automatically, and reduces manual intervention.

Read more on the .NET blog.

How to Get Started

Follow these steps to utilize the modernization tool:

  1. Install the Extension: Download the extension from the Visual Studio Marketplace.
  2. Enable Copilot Agent Mode:
    • Ensure Visual Studio 17.14 or later is installed.
    • Sign in with a GitHub account with an active Copilot subscription.
    • Go to Tools > Options > GitHub > Copilot > Copilot Chat and enable “Agent mode in the chat pane”.
    • Open Copilot Chat, click the “Ask” button, then select “Agent.”
    • In Copilot Chat Tool Selector, pick the “Upgrade” tool for specialized functionality.

For more information on Agent Mode, see the dedicated blog post.

Running Upgrades

There are two primary ways to start upgrading your .NET solution:

  • Context Menu: Right-click your project or solution in Solution Explorer and choose “Upgrade with GitHub Copilot”.
  • Copilot Chat Command: Enter a command like “Upgrade my solution to .NET 8” in the Copilot Chat window. Copilot will then analyze, prepare, and guide you through the upgrade process.

Key Features

  • Automated Code Transformations: Copilot performs necessary changes to your codebase, moving applications to modern .NET versions.
  • Customizable Workflows: Choose specific projects to upgrade, opt to address vulnerable packages, and personalize upgrade paths.
  • Learning from Manual Changes: If manual updates are required, Copilot records and learns from your interventions, reusing this knowledge for similar scenarios in the same upgrade.
  • Git Integration: Automatic commits are created for upgraded files, supporting incremental adoption and testing.
  • Automatic Test Validation: Your application’s unit tests are run automatically post-upgrade, verifying correctness.
  • Agent Mode Support: Enhanced automation and conversation-driven upgrades with Copilot Agent Mode in the latest Visual Studio preview.

Feedback and Community Engagement

Feedback is welcomed to improve the tool:

Stay Connected

For ongoing Visual Studio updates, release notes, videos, and community interaction, visit the Visual Studio Hub.


References & Resources


Image and Media Credits:

This post appeared first on “Microsoft DevBlog”. Read the entire article here