{"id":58904,"date":"2025-11-18T10:05:00","date_gmt":"2025-11-18T18:05:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=58904"},"modified":"2025-12-10T14:33:11","modified_gmt":"2025-12-10T22:33:11","slug":"modernizing-dotnet-with-github-copilot-agent-mode","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/modernizing-dotnet-with-github-copilot-agent-mode\/","title":{"rendered":"A step-by-step guide to modernizing .NET applications with GitHub Copilot agent mode"},"content":{"rendered":"<blockquote><p>This blog post has been updated to reflect changes in the 18.1 release.<\/p><\/blockquote>\n<p>Upgrading an old .NET app doesn\u2019t have to mean chasing broken builds and cryptic errors. Yet for many developers, a\nsimple version bump turns into hours of dependency conflicts and manual fixes.<\/p>\n<p>Modernization isn\u2019t just about staying current. Older frameworks can introduce security risks, slow performance, and\nblock cloud adoption. Upgrading unlocks modern APIs, better tooling, and cloud-native features like automated scaling\nand secure identity management.<\/p>\n<p>That\u2019s where GitHub Copilot app modernization comes in. Think of it as your modernization assistant, guiding you through\nevery step, automating the heavy lifting, and helping you move from \u201cthis might take weeks\u201d to \u201cdone in hours.\u201d<\/p>\n<h2>What you\u2019ll learn<\/h2>\n<p>By the end of this guide, you\u2019ll know how to:<\/p>\n<ul>\n<li>Analyze your .NET projects and generate a clear upgrade plan<\/li>\n<li>Apply changes automatically with GitHub Copilot<\/li>\n<li>Fix build issues and validate tests in real time<\/li>\n<li>Review a detailed summary report<\/li>\n<li>Prepare your app for Azure migration and deployment<\/li>\n<\/ul>\n<h2>Before you begin<\/h2>\n<p>To follow along, make sure you have:<\/p>\n<ul>\n<li>Visual Studio 2026 (or Visual Studio 2022 version 17.14.17 and newer)<\/li>\n<li>A GitHub Copilot license<\/li>\n<li>.NET desktop development workload with GitHub Copilot and GitHub Copilot app modernization enabled<\/li>\n<\/ul>\n<h2>Upgrade your .NET app<\/h2>\n<h3>Step 1: Open your project or solution<\/h3>\n<p>Start by launching Visual Studio and opening your .NET project or solution.<\/p>\n<h3>Step 2: Start an agent session<\/h3>\n<p>You can begin in two ways:<\/p>\n<ul>\n<li>Right-click your project or solution in Solution Explorer and select Modernize<\/li>\n<li>Or open GitHub Copilot Chat and type @modernize followed by your request<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/modernize-menu-action.webp\" alt=\"Modernize right-click context menu action\" \/><\/p>\n<h3>Step 3: Choose your path<\/h3>\n<p>Next, decide what you want to do:<\/p>\n<ul>\n<li>Upgrade to a newer .NET version for better performance and security<\/li>\n<li>Migrate to Azure to unlock cloud-native capabilities<\/li>\n<li>Explore more modernization options if you have additional goals<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/12\/upgrade-to-newer-version-dotnet.webp\" alt=\"Upgrade to a newer version of .NET\" \/><\/p>\n<h3>Step 4: Assess and plan<\/h3>\n<p>Copilot evaluates your code, dependencies, and project structure, then creates an assessment.md report that includes:<\/p>\n<ul>\n<li>Outdated NuGet packages and recommended target versions<\/li>\n<li>Project count and upgrade complexity<\/li>\n<li>API analysis and potential breaking changes<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/12\/upgrade-assessment.webp\" alt=\"Upgrade assessment.md\" \/><\/p>\n<p>After the assessment finishes, Copilot creates a plan.md file based on your project&#8217;s current state. The plan outlines\nthe recommended upgrade steps and is fully editable, giving you control over how the upgrade proceeds.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/12\/upgrade-plan.webp\" alt=\"Upgrade plan.md\" \/><\/p>\n<p>You can edit the plan to add context, reorder steps, or exclude specific projects before approving.<\/p>\n<h3>Step 5: Apply changes and resolve errors<\/h3>\n<p>Once you approve the plan, Copilot begins applying the recommended upgrade steps. This stage is tracked in a tasks.md\nfile that records each task as it runs.<\/p>\n<p>Copilot will:<\/p>\n<ul>\n<li>Upgrade files, adjust imports, and fix syntax issues automatically<\/li>\n<li>Handle build errors in a fix-and-test loop to ensure stability<\/li>\n<li>Keep the tasks.md file updated as progress continues<\/li>\n<li>Commit major changes to Git for easy rollback if needed<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/12\/upgrade-tasks.webp\" alt=\"Upgrade tasks.md\" \/><\/p>\n<p>If Copilot encounters a problem it can\u2019t fix automatically, it pauses and asks for your input, keeping you in control.<\/p>\n<h3>Step 6: Review the results<\/h3>\n<p>When the upgrade is complete, Copilot provides a final summary that includes:<\/p>\n<ul>\n<li>A detailed report with Git commit hashes for traceability<\/li>\n<li>A Next Steps section for post-upgrade actions like updating CI\/CD pipelines or running integration tests<\/li>\n<\/ul>\n<h2>Make your app cloud ready<\/h2>\n<p>Modernization doesn\u2019t stop at upgrading your code. Making your app cloud-ready unlocks scalability, security, and\noperational efficiency. Here\u2019s how Copilot helps:<\/p>\n<h3>Step 1: Run a cloud readiness assessment<\/h3>\n<p>Start by selecting Migrate to Azure from the GitHub Copilot app modernization UI.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/12\/migrate-to-azure.webp\" alt=\"Migrate to Azure\" \/><\/p>\n<p>Copilot will:<\/p>\n<ul>\n<li>Scan your project for framework compatibility and configuration gaps<\/li>\n<li>Identify authentication and identity issues for cloud environments<\/li>\n<li>Highlight dependency vulnerabilities that need attention<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/assessment-in-progress.webp\" alt=\"Assessment in progress\" \/><\/p>\n<p>When the assessment finishes, you\u2019ll see a detailed report along with:<\/p>\n<ul>\n<li>A list of migration tasks in the chat window<\/li>\n<li>Criticality ratings<\/li>\n<li>Recommended actions<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/assessment-report.webp\" alt=\"Assessment report\" \/><\/p>\n<h3>Step 2: Approve and execute the migration plan<\/h3>\n<p>Similar to the upgrade process, Copilot creates a migration plan that will:<\/p>\n<ul>\n<li>Highlight dependency updates for Azure compatibility<\/li>\n<li>List configuration changes for cloud services to ensure smooth deployment<\/li>\n<li>Include security enhancements for compliance<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/migration-plan.webp\" alt=\"Migration plan\" \/><\/p>\n<p>Once you approve the plan, Copilot will:<\/p>\n<ul>\n<li>Update your configuration and code<\/li>\n<li>Add required Azure SDKs and authentication adapters<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/migration-success.webp\" alt=\"Migration complete\" \/><\/p>\n<h3>Step 3: Validate and secure<\/h3>\n<p>After code remediation, Copilot will:<\/p>\n<ul>\n<li>Run automated CVE scans on all updated dependencies<\/li>\n<li>Propose safe version replacements if vulnerabilities are found<\/li>\n<li>Confirm all tests pass and build integrity is maintained<\/li>\n<\/ul>\n<h3>Step 4: Deploy to Azure<\/h3>\n<p>Finally, deployment is fully automated. Copilot handles:<\/p>\n<ul>\n<li>Provisioning resources without manual scripting<\/li>\n<li>Configuring monitoring and logging for observability<\/li>\n<li>Securing identities for safe access<\/li>\n<\/ul>\n<p>From code to cloud in minutes, without writing infrastructure scripts.<\/p>\n<h2>Try GitHub Copilot app modernization today<\/h2>\n<p>Ready to modernize your .NET apps faster? Whether you\u2019re upgrading frameworks or planning a cloud migration, GitHub\nCopilot app modernization helps you analyze large codebases, automate fixes, and save hours of manual work. <a href=\"https:\/\/aka.ms\/ghcp-appmod\/dotNET\">Learn more<\/a> and try it out today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how Visual Studio 2026 and GitHub Copilot app modernization upgrade .NET versions and frameworks, fix build issues, and migrate apps to Azure with less manual effort<\/p>\n","protected":false},"author":5818,"featured_media":59158,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7781,7252,646],"tags":[7869],"class_list":["post-58904","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-ai","category-cloud","category-visual-studio","tag-github-copilot"],"acf":[],"blog_post_summary":"<p>Learn how Visual Studio 2026 and GitHub Copilot app modernization upgrade .NET versions and frameworks, fix build issues, and migrate apps to Azure with less manual effort<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/58904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/5818"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=58904"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/58904\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/59158"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=58904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=58904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=58904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}