.NET 5 has just been released, and there will be many questions about how it will effect an ASP.NET Core application.
What software is needed? What's the difference between the new version and ASP.NET Core 3.1? What's happening with .NET Standard?
We will have a look at five questions that might occur when upgrading your ASP.NET Core application to .NET 5.
Visual Studio 2019 will need to be updated to version 16.8 or above to be able to use an ASP.NET Core application with .NET 5.
As a result, you will need to make sure that you have at least MS Build version 16.8 to be able to build your project.
If you are not using Visual Studio, the easiest way to get MSBuild is to install the .NET 5 SDK onto your machine.
With .NET 5, the word 'Core' is being removed. But what about ASP.NET Core? Is the word 'Core' being removed from that?
Well, no is the answer to that. And the probable reason for it is that ASP.NET 5 was actually the working title for ASP.NET Core back in 2015, according to this article from ScottGu's blog.
Eventually, it was decided that they would reset the version number back to 1, so it was called ASP.NET Core 1.0 as Scott Hanselman detailed in this 2016 article.
It's also worth noting that the first version of .NET Core was .NET Core 5. This was before it became .NET Core 1.0. That might be another reason why the word 'Core' has been removed from .NET.
From now, .NET will have a new major release every November for the foreseeable future.
So, the current timeline according to this article is as follows:
It must be noted that all even number versions (e.g. .NET 6 & .NET 8) will have long-term support (LTS) associated with them.
After .NET Standard 2.1, it will be no more. The whole point of .NET 5 is to produce a single .NET runtime and framework.
But the good news is that .NET Standard and .NET Core class libraries are supported through .NET 5.
But what if you want to upgrade a .NET Standard or .NET Core class library to .NET 5? Well there are a couple of things to consider:
Unlike the jump between ASP.NET and ASP.NET Core, there isn't a major difference between ASP.NET Core 3.1 and ASP.NET Core for .NET 5. Well, certainly not for the startup anyways.
ASP.NET Core applications are still built in Console Applications. You create a HostBuilder instance and use the Startup class to make the configurations.
One thing that Visual Studio templates supports for ASP.NET Core Web API's is the ability to install Swagger documentation into your application. This seems to be a new feature for ASP.NET Core for .NET 5.
Watch our tutorial below where we look at these five questions and update an ASP.NET Core Web API from 3.1 to 5.
Subscribe to our YouTube channel to get more ASP.NET Core coding tutorials.
You'll get videos where I share my screen and implement a how-to guide on a topic related to ASP.NET Core.
You can expect to see videos from the following technologies:
By subscribing, you can get access to all my ASP.NET Core coding tutorials completely free!
And so you never miss out on a new video, you have the option to be notified every time a new video is published.
So what are you waiting for?