-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Describe the bug
AspNet Core 5.0.4 seems incompatible with earlier Net 5 runtimes eg, 5.0.3
To Reproduce
-
Ensure below runtimes are installed.
.Net core - 5.0.3
AspNet Core - 5.0.4 (Shared framework)
We also have Net Desktop 5.0.3 however that seems to be optional for the bug. -
Create a simple AspNet api from the template. WeatherForecast example would do.
-
Build the api project.
-
Run the generated .exe or run the .dll using dotnet tool.
Result:
The error shows
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '5.0.4' was not found.
- The following frameworks were found:
2.1.24 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
3.1.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
5.0.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
Please note this issue goes away if I manually install .Net Core 5.0.4
However since this is just a patch should this need a .Net Core runtime upgrade to version 5.0.4 as well? Should we expect this behavior on any further patch/minor updates too?
Exceptions (if any)
Further technical details
- ASP.NET Core version : 5.0.4
- Include the output of
dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.102
Commit: 71365b4d42
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.102\
Host (useful for support):
Version: 5.0.3
Commit: c636bbdc8a
.NET SDKs installed:
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
- The IDE (VS / VS Code/ VS4Mac) you're running on, and its version - VS Enterprise 16.8.4