Transitioning from Dotnet Framework to Dotnet Core


By the way, I have made the decision to transition from Dotnet Framework to Dotnet Core for the large project I am working on. I would like to share with you the process of transitioning from the current version of the project, which is based on Dotnet Framework, to Dotnet Core 6.

First of all, I want to mention that this process is not as long as you might think. After doing some research, you realize that if there are no major issues, it won’t take days to complete this transition. Microsoft has already provided a solution to facilitate this process for us. With a small upgrade tool, you can accomplish this transition in a shorter time. However, they have also prepared a guide (in English) for those who prefer to proceed manually.

To continue our process using the Upgrade Assistant, we will follow the steps below:

Firstly, you need to install the SDK of the Dotnet version you will transition to on your system. As of the time of writing this, I have chosen Dotnet Core 6 LTS version. You can choose an appropriate SDK for yourself.

Once you have completed the SDK installation, we will run the following command to install the Upgrade Assistant. The source can be found here:

dotnet tool install -g upgrade-assistant

After performing this step, we can start the Upgrade Assistant by specifying the directory where our project is located with the following command:

upgrade-assistant upgrade .\Project.csproj

After this step, we begin the upgrade process. First, a small tool will analyze the project and provide feedback on the analysis. For example, if you have .aspx files in your project, it will inform you that they are not supported. In this case, you can convert your existing project to a service-based architecture and continue with MVC, getting rid of the .aspx files. After that, you can proceed with the upgrade process.

Another point to consider is that during the upgrade process, you may receive notifications that certain packages you used previously in your .csproj file are not supported according to the analysis results. In this case, you may need to use the updated versions of those packages or remove them.

Once you have completed these steps, you can follow all the instructions provided by the Upgrade Assistant, including making a backup of your project, to finalize the process. I am sharing a sample image I obtained from the Microsoft website below. Happy upgrading!