Is it possible to run netcore 3.x application under the net5

Konstantin Petukhov 1 Reputation point
2021-01-29T05:26:15.473+00:00

I have a clean Windows 10 x64 virtual machine with dotnet 5.0.2 SDK installed

I created the new project using 'dotnet new console' I edited the .csproj file changing net5 target to netcoreapp3.1 I called 'dotnet build' - its ok I called 'dotnet run' - its failed

The output is: It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '3.1.0' was not found. - The following frameworks were found: 5.0.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

Does the net5 is back compatible with netcoreapp3 ?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,178 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ken Tucker 5,856 Reputation points
    2021-01-29T10:48:03.28+00:00

    You will need to install .net core 3.1 to fix issue. You can multiple versions of .net core installed on your computer

    0 comments No comments

  2. Michael Taylor 55,461 Reputation points
    2021-01-29T14:57:32.073+00:00

    Duplicate question of this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.