Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The specified framework 'Microsoft.NETCore.App', version '2.2.0' was not found

I am using Visual Studio 2019 Version 16.3.7. I assume it is the latest update.

When I try to compile a basic .NET Core 2.2 console application:

enter image description here

...I get the following error:

It was not possible to find any compatible framework version The specified framework 'Microsoft.NETCore.App', version '2.2.0' was not found.   - The following frameworks were found:       1.0.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]       2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]       2.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]       2.1.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]       2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]       3.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]  You can resolve the problem by installing the specified framework and/or SDK.  The .NET Core frameworks can be found at:   - https://aka.ms/dotnet-download . 

enter image description here

My understanding is that .NET Core 3.0 is backward compatible. Why Visual Studio installer installed all versions of .NET Core except 2.2? How do I solve this problem?

like image 388
Allan Xu Avatar asked Nov 04 '19 22:11

Allan Xu


People also ask

How do I find my Microsoft NET Core app version?

On the command prompt, type dotnet --version.

How do I install Microsoft NET Core app?

NET Core can be installed in two ways: By installing Visual Studio 2017/2019 or by installing . NET Core Runtime or SDK. . NET Core installer already contains ASP.NET Core libraries, so there is no separate installer for ASP.NET Core.

What is NET Core app?

ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled, Internet-connected apps. With ASP.NET Core, you can: Build web apps and services, Internet of Things (IoT) apps, and mobile backends. Use your favorite development tools on Windows, macOS, and Linux.

How do I uninstall .NET Core?

You can search for core or . net to filter and show installed versions of . NET. Select any versions you want to remove from your computer and click Uninstall.


1 Answers

For whatever reason, .NET Core 2.2 is not installed by the ".NET Core cross-platform development" workload.

Open up the Visual Studio installer then go to the "Individual components" tab and you can install it from there:

enter image description here

enter image description here

enter image description here

like image 138
Stephen Kennedy Avatar answered Sep 26 '22 19:09

Stephen Kennedy