Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update from Microsoft.NetCore.App 2.0 to 2.1.4

I created an ASP.NET Core Web API project in Visual Studio 2017 version 15.7.2.

When I created it, it was Microsoft.NetCore.App 2.0.

Now I want to update to Microsoft.NetCore.App 2.1.4 but I can't because Visual Studio tells me:

Implicitly referenced by an SDK. To update the package, update the SDK to which it belongs

I download the latest version of .NET Core and I installed it, but I got the same issue.

Any ideas?

like image 562
Guille Avatar asked May 30 '18 12:05

Guille


People also ask

What version is .NET Core?

NET 5.0, Microsoft . NET Core has been rebranded as . NET. ASP.NET Core and Entity Framework Core follow the same lifecycle as .

Is .NET Core 2.2 LTS?

NET Core 2.2 Lifecycle. . NET Core releases belong to one of two support lifecycles: long term support (LTS) and Current. LTS releases are stable release which receive critical updates and are supported for at least three years.


1 Answers

Don't confuse SDK (=> Build tools) versions with .NET Core versions.

The 2.1.* SDK versioning was unfortunate, the versioning scheme has since been changed and the scheme transition will be (mostly) complete with the release of .NET Core 2.1.

You don't need to update the Microsoft.NETCore.App NuGet package as it only contains build references needed to build your application.

For self-contained applications, you can also set the <RuntimeFrameworkVersion> property inside the csproj file, but starting with the .NET Core SDK 2.1.300, you no longer need to as it will know about the latest versions.

like image 84
Martin Ullrich Avatar answered Sep 21 '22 11:09

Martin Ullrich