How to do .NET 8 Migration with Existing Tools?

As we all know Microsoft Technology, which is coming with multiple environments like(Desktop, Web, Mobile apps, etc) so the technology framework also vary depending on which environment the application is going to execute.

So depending on the environment the application needs to be designed and constructed. But now challenges will pop up.

Tools require

  1. Visual Studio 2022
  2. Dotnet Framework or Core
  3. Visual Studio extension: Upgrade assistant latest

Step 1. Before migrating to the upper version please check and confirm that the present application target framework. Check like below after clicking solution properties.

 Target Framework

Step 2. Just right-click the solution, and click the upgrade button menu.

 Button Menu

Step 3. The upgrade assistant window will show and it will ask for the next step to upgrade the project:

 Upgrade

Step 4. This window will ask to select the target framework.

Window

Step 5. Now it will select the components that you want to migrate to an updated version or Update to the latest target framework.

Components

Step 6. As I select all the components, so it will check and give you the latest code modification or it will suggest to make the changes. Upgradation is in progress. It will take some time to complete and generate the report.

Generate the report

Step 7. Now report is generated and it will show it to the upgrade assistant window. Below, please consider it as an example, if the project is an enterprise application then the project output will change.

 Enterprise application

Step 8. The developer can check the status in the Visual Studio output window.

 Visual studio

Now that the DotNet or .Net upgrade assistant is done, depending on the upgrade assistant's suggestion we need to take the steps and modify the code base.

Here In Step 7, we can see that MVVMLight is not supported in the .net8-windows target framework. So we need to take a decision and update those packages.

In this scenario MVVMLight alternative CommunityToolkit.MVVM which is available in Nuget, and accordingly needs to modify the codebase also.

Thank you.


Similar Articles