4
votes

I have run the following command to update my EF Core Tools:

dotnet tool update --global dotnet-ef

After running it, I tried to run

dotnet ef --version

But then it threw this error:

It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '3.1.2' was not found. - The following frameworks were found: 2.1.13 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] 2.2.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] 3.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] 3.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

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

The specified framework can be found at: - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.2&arch=x64&rid=win10-x64

After seeing it I followed the link and downloaded all possible packages but nothing changed.

How do I resolve this problem?

2

2 Answers

7
votes

I have found a way to solve this problem. Worth noting, however, it's not the best approach:

dotnet tool uninstall --global dotnet-ef
dotnet tool install --global dotnet-ef --version 3.1.1
0
votes

What packages did you download?

The dotnet ef you are using is of version 3.1.2 but your .net core desktop runtime 3.1 version is below the version 3.1.2 All you need to do is to download the .net core runtime 3.1 version 3.1.2

https://dotnet.microsoft.com/download/dotnet-core/3.1/runtime/?utm_source=getdotnetcore&utm_medium=referral