In the realm of software development, every software project acquires technical debt. One of the areas a project can require technical dept is when a platform gets updated. Back on December 3, 2019, Microsoft released .NET Core 3.1. The most important feature is that .NET Core 3.1 is LTS meaning its a long-term supported release. It will be supported by Microsoft until December 3, 2022. On December 26, 2019, the Orchard Core team updated to their projects .NET 3.1.
You can download the latest version of .NET Core at https://dotnet.microsoft.com/download.
Select the .NET Core 3.1 version.
Click on the Windows x46 version.
Load the MyOrchardCoreCMS solution. Most of the time Visual Studio will update .NET Core for you. Just make sure you have the latest version. You ca click on Help and the About to display the version.
In order to update the .NET platform to the latest, right click on the "MyOrchardCoreCMS" project and select "Properties".
Now let's update to the latest NuGet packages. Right click on the "MyOrchardCoreCMS" project and select "Manage NuGet Packages...".
Click on the "Updated" tab, you can "Select all packages" and the press the "Update" button.
Click on the "OK" button to confirm.
Select the "MyOrchardCoreCMS.Web" from the drop down combo box and press the green play button.
Enter your site name, select the Blog recipe, your credentials and press the "Finish Setup" button.
Your Orchard Core CMS Application is up and running with the latest software.
Go to the Admin Dashboard by appending "/admin" on the URL.
The Admin Dashboard is up and running as well.
With your favorite browser, browse to your DevOps site and select the project.
Select the Pipelines.
Click on your CI pipeline.
Click on Edit.
Add a new task by pressing the "+".
Search for :Use .NET Core" task and then add the task. Select "3.1.x" for the version. Save the changes.
Click on the CD Pipeline and select the "Edit" button".
Click on the "View stage tasks".
Modify the Runtime Stack to "dotnetcore|3.1".
Go back to Visual Studio select the "Teams Explorer" tab and then the "Changes" button.
Enter you description and then press the "Commit All" button.
Click on the "house" icon.
Press the "Sync" button.
Click the "Push" to push your changes to your repository.
Everything was pushed successfully.
Go back to the CI edit page select "Save and queue".
Click the "Save and Run"
Once the build task has been queued, click on the "Agent job 1" link.
Build is now successful.
Select the CD pipeline and select the latest release queued.
The delivery was successful.
With your favorite browser, browse to your site. Congratulations you got rid of some of your technical debt. Everything is working with the latest software.
Append "/admin" to your URL and enter your credentials to access the Admin Dashboard.
Admin Dashboard has been updated and working as well.
Technical Debt can be seen as a shortcut, which saves teams’ time, effort and/or money today, but might lead to increased costs in the future. Technical Debt cannot really be avoided in software projects. If the team and the customer handle the risk of Technical Debt properly, it should remain manageable. Any repayment should be a business decision. Even if the repayment is so small that a consultation with the customer does not make sense, the developer must always ask himself whether an improvement of the code really justifies the invested time and effort.
The complete source code is located here.