August 29th, 2023

New .NET Upgrade Assistant version with feature updates and .NET MAUI improvements!

Olia Gavrysh
Senior Product Manager

We are happy to announce that we have released a new version of .NET Upgrade Assistant in Visual Studio that adds the ability to update features of your projects without changing the target framework and has lots of improvements for migrating to .NET MAUI!

The .NET Upgrade Assistant is a tool that helps you upgrade your application to the latest .NET and migrate from older platforms such as Xamarin Forms and UWP to newer offerings. With this new version of the tool you can also upgrade project features without changing the .NET version.

What’s new in this version

Upgrading project features

We have received feedback that in some cases you wanted to decouple .NET version upgrades from other types of upgrades, for example a very popular request was to enable conversion of the old style project file to the new SDK-style project file without changing the .NET framework version, so you can take an iterative approach in modernizing your applications. Now on the first page of Upgrade Assistant, if there are any projects features upgrades available for your project, you will see two options: Upgrade project to a newer .NET version and Upgrade project features.

Upgrade Assistant welcome page showing two options

While the first option leads you to the same experience you’ve seen in the previous versions of Upgrade Assistant that will help you upgrade your .NET version, the second introduces the new functionality we’ve added in this release. Once you click on Upgrade project features you’ll see upgrades available for your project.

Upgrade type page

Currently there is only one type available – upgrade to SDK-style project file, but we are planning on adding more types here in the future, so do let us know what kind of upgrades you need for your apps (see the section Give us feedback! below).

Note that if your project file is already SDK-style, the first page with two options won’t be shown to you, and only the .NET version upgrade scenario will be offered.

When you click Next, the Upgrade Assistant will convert your project file to the new style while the target framework for your project will remain unchanged.

Result of the upgrade

You can see the project file before and after the upgrade.

Project file before and after the migration

Updates in .NET MAUI migration

We have added many improvements into the .NET MAUI area!

First of all, now you can upgrade your apps on macOS as well using the CLI version of the .NET Upgrade Assistant.

If you prefer to upgrade your Xamarin.Forms to .NET MAUI manually, we have added automatic code fixers to help you update your code. Now you can paste your Xamarin.Forms files into a .NET MAUI project and our new Upgrade Assistant C# analyzer will offer to fix your code to make it compatible with .NET MAUI. You can see a light bulb near Xamarin namespaces that offers to fix the entire document or optionally project or solution.

Upgrade Assistant code fixers in Code Editor

Besides these two big features we have added numerous bug fixes and infrastrucrure improvements to make the upgrades to .NET MAUI even better. And we will continue work in this area.

What’s next

We will continue working on improving the quality of upgrades, adding more feature upgrades, improving migration for .NET MAUI and addressing your feedback.

Learn how to upgrade

We have lots of materials to help you with your upgrade process:

Give us feedback

Please give us your feedback so we can build the right tools for you by filling out this brief survey.

You can also file issues or feature requests from Visual Studio by choosing Help | Send Feedback. Ensure to mention “Upgrade Assistant vsix” in the title.

Author

Olia Gavrysh
Senior Product Manager

Olia is working on .NET Core and WinForms. Before she was doing Machine Learning and AI at ML.NET team.

10 comments

Discussion is closed. Login to edit/delete existing comments.

  • Ambale Sunny

    Hi Olia,
    Just wanted to understand whether the comparison window shown in the article automatically comes up post successful upgrade or is it something we have to do manually. Because I didn’t see any comparison window coming up post upgrade.

  • designer shount · Edited

    So. when will the Windows team use .NET Upgrade Assistant to upgrade all the .NET Framework code in Windows to more recent versions of .NET?

    By the way, 230 – 220 × 0.5 equals 120, not five.

  • Mystery Man

    So… when will the Windows team use .NET Upgrade Assistant to upgrade all the .NET Framework code in Windows to more recent versions of .NET?

    By the way, 230 – 220 × 0.5 equals 120, not five.

    • Paulo Pinto

      They won’t, that is why most of those “how we upgraded to .NET Core” blog posts are from teams using ASP.NET and not desktop technologies, VS plugins, SQL Server CLR support, Dynamics, Sharepoint WebParts, ….

  • Robin Sue · Edited

    You can see the project file before and after the upgrade.

    this looks like it upgraded an classic ASP.NET web app to the SDK style format, is this supported now? last I’ve tried, ASP.NET web apps were not supported by SDK style projects.

    Also the files are still explicitly listed after the conversion, should this not use wildcard inclusion or set EnableDefaultItems to false?

    • Yair K

      As far as I can tell, the ASP.NET update assumes it's working with a Winforms app, which is why it leaves exein the csproj file. Also unnecessary inclusions. It can however be edited manually to build.

      The only additional thing we really need for this conversion to be useful with ASP.NET is Publish/Run support in Visual Studio itself (the nuget package script issue is not important, since these projects are rather frozen - and we...

      Read more
  • Mark Adamson

    Is the 'Upgrading project features' thing available in the CLI version? It's a great feature to have.

    It would be good if the SDK conversion had more options, like whether to replace AssemblyInfo or not. Again that would allow for a more incremental upgrade of solutions that use lots of legacy techniques like a shared solutioninfo.cs file. It would be neat if it could detect that too and move the shared settings to a Directory.Build.props file...

    Read more
    • Sahil Ojha

      ‘”>

    • Ambale Sunny

      Totally agree with this point. We need this feature in CLi as well since extension involves opening the solution every time to operate.

    • Olia GavryshMicrosoft employee Author

      Thanks! Those are all great candidates for future features, awesome feedback!

      Feature updates are not yet available in CLI, but we can add it if we see enough developers needing it.

      I’ll take your suggestions to the engineering team, meanwhile if you could create feature request in Visual Studio (in Help | Send Feedback), that would help us to track the community feedback and prioritize the features.