when I use the dotnet command I have an issue
> dotnet Mydll.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '5' was not found.
- The following frameworks were found:
2.1.23 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.2.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
2.2.8 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.0.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.10 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.7 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=5&arch=x64&rid=win10-x64
I am a little suprised cause it seems I have the the runtime Microsoft.NETCore.App 5.0.0 installed and also the 5.0.7
>dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
I have installed the Hosting Bundle of ASP.NET Core Runtime 5.0.7 for being sure but still have the issue
Would you have an idea nout what is the issue and how to fix it?
Uninstall the deprecated package globally:
dotnet tool uninstall dotnet-ef -g
And then try to Reinstall the up-to-date package version:
dotnet tool install --global dotnet-ef --version 5.0.1
If this does not work, try the second process:
So you have already installed .NET 5.
Download dotnet-sdk-5.0.301-win-x64.zip and copy the Microsoft.AspNetCore.App\5.0.301
folder manually from the zip file to C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.301
Then the application should started working.