In this tutorial, we will see how to upgrade Asp.Net Core 3.1 application to Asp.NET Core 5 using very simple steps. Microsoft announced its major release .NET 5. It provides a unified .NET SDK experience with a single base class library (BCL) across all .NET 5 applications. It provides a single .NET Platform form for all kinds of applications like Desktop Applications (WPF, Windows Forms, UWP), Asp.Net Core, Xamrin, and etc. If you want to know more about .NET 5 then click here.
How to upgrade Asp.Net Core 3.1 app to Asp.Net Core 5?
Let’s see how to upgrade Asp.Net Core 3.1 application to Asp.Net Core 5.
Step # 1: Install .Net 5
First-of-all, we will install .NET 5. So, click here to download and then install .NET 5 according to your machine.
Step # 2: Update Visual Studio 2019
Now, in this step, we will update the visual studio 2019 to 16.8 version or later to use .NET 5.
Note: – you can skip this step, if your visual studio 2019 version is already 16.8 or later.
So, go to install and then update the visual studio 2019 and then it will take some time as you do see below in the screenshot.
After some time, the update will be completed and then you will see the updated version as you do see below in the screenshot.
Step # 3: Update Project Framework
Now, in this step we will see how to update the Asp.Net Core 3.1 project. So, right click on the solution and then select properties as you do see below in the screenshot.
Now, click on the Target framework and then select the .NET 5 from the dropdown and build the project.
Note: – You can update the project framework by simply updating the project file as you do see below file’s line # 3.
Step # 4: upgrade NuGet Packages
In this step, we will see how to upgrade the NuGet packages. So, right click on the Tools and then click on the NuGet Package Manager and then click on the Manage NuGet Packages for Solution…
Now, go to Updates tab and then you will see all the packages that are available for updates. Update them and then rebuild the project
Note: – In my case I don’t have any package to update
Now, our project is upgraded successfully from Asp.Net Core 3.1 to Asp.Net Core 5. If you see any error then click here.
Thank you for reading. Please keep visiting and sharing this blog.