MMS • Almir Vuk
Article originally posted on InfoQ. Visit InfoQ
A new available extension makes it possible to update any .NET application to the most recent .NET version within Visual Studio. Applications built using .NET Core or .NET Framework can now be upgraded using the upgrade tool, within Visual Studio. Several project types, are still in development and will also 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 feedback from users 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 available: 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 options that are suitable for their particular 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 named: Upgrade Your .NET Projects Faster with Visual Studio;. In this video, Olia shows you how to get the extension and start to 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.