A new Visual Studio .NET Upgrade Assistant extension makes it possible to update any .NET application built using .NET Core or .NET Framework to the most recent .NET version. The ability to upgrade additional project types is still in development and will be available soon.
The .NET Upgrade Assistant is a Microsoft tool that helps developers upgrade their .NET Framework apps to .NET 5 or later by analyzing code and dependencies, generating a report of issues, and providing code fixes. The tool simplifies the upgrade process and ensures compatibility with the latest .NET runtime.
Microsoft has been working on simplifying the process by developing new tools, including the Upgrade Assistant CLI and Microsoft Project Migrations. After receiving user feedback through surveys, comments, and feature requests, Microsoft concluded that a unified upgrade experience for all project types within Visual Studio was needed. By doing so, Microsoft aims to make the upgrade process more straightforward and accessible for developers.
According to the .NET blog post, the upgrade tool within Visual Studio is planned as a lasting solution to keep applications up-to-date with the latest .NET runtime. Additionally, aside from changing the target framework version, the upgrade assistant is also set to address some of the breaking changes by modifying the code.
The extensions support several project types, including ASP.NET, class libraries, console applications, WPF, and WinForms. These project types are similar to what the Upgrade Assistant CLI tool supports. In the future, the tool will add support for migrating Xamarin to .NET MAUI, migrating UWP to WinUI, and migrating WCF to WCF Core.
For not supported types, Microsoft recommends:
If you need to migrate these project types today, we recommend using the existing Upgrade Assistant command line tool, which already has code fixers. The Visual Studio extension will get them soon too.
The Upgrade Assistant has three upgrade types: in-place, side-by-side, and side-by-side incremental. Each type will be recommended for specific project types. While using it, developers will only be presented with suitable options for their application.
In-place upgrades the original project all at once, while side-by-side adds a copy of the project to the solution containing the upgraded code. Side-by-side incremental is ideal for web applications and allows the gradual upgrade of items to .NET 6/7 without breaking the app.
On the official post by Microsoft, you can find the status of all upgrade types by project type in the table form and the walkthrough steps of an upgrade of the class library with the In-place type of upgrade.
In addition to the blog post, the official dotnet YouTube channel provides the video, "Upgrade Your .NET Projects Faster with Visual Studio". In this video, Olia shows you how to get the extension and update your projects to the latest version of .NET in minutes.
A survey is also available, to gather feedback on the newly available feature for upgrading .NET projects from within Visual Studio. Users are encouraged to share their experiences and suggest improvements by participating in the survey More info and details about .NET Upgrade Assistant can be found on the official Microsoft dotnet website.