I have downloaded and installed the new .NET framework 5.0 from this website.
But I would like to know how to add this framework to a project created on Visual Studio 2019 16.8.0.
Note:
But the most recent framework that I got is .NET framework 4.8
How can I add the new framework to the target frameworks in Visual Studio 2019?
Update:
I have a conflict now and I would like to know what's the difference between .NET framework SDK and .NET framework Developer pack, I'm wrong in this point.
As mentioned in the link above, there is no .NET framework 5.0 in the developer pack list.
Can anyone explain this to me?
You must have version 16.8.0 in order to have .Net Core 5.0 Net Core 5.0 in Visual Studio version 16.8.
Download and install the Visual Studio 2019 SDK from the .NET Core releases site.
.NET 5.0 is continued development of .NET Core and it no longer follows the old (.NET 4 and older) targeting pack. Instead, .NET 5 is installed as an SDK into the .NET Core framework & sdk directory structure. For folks who have been doing .NET Core for some time, this feels natural, but coming from .NET 4, it's new.
Create a new .NET Core project type and set the .NET version to .NET 5.0
:
There are specific .NET
(not .NET Framework
) project templates for Winforms and a few other project types. These will also target .NET 5 or .NET Core where appropriate:
Unfortunately, there is no magic wizard to upgrade a .NET 4 project over to .NET 5. The step-by-step guidance can be found here:
Many ASP.NET folks have gone through these steps to move from .NET 4 to .NET Core in the past. There are many blog posts on the issues they bumped into and how they solved that. The process is very similar and there are some tools now to help you along the way.
The main steps are the same for every .NET 4 project:
packages.config
to <packageReference>
format.Alternatively:
It may be possible there won't be a NuGet package of 3rd party components you use that are compatible with .NET 5. In that case you'll need to either wait for one to be released or find an alternative. Of course, in case of open source projects, you could help them out by porting the package for them and sending a pull request.
The Migration guidance linked above gives you multiple approaches to achieve each step.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With