question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AspNet Core 5.0.4 seems incompatible with earlier Net 5 runtimes

See original GitHub issue

Describe the bug

AspNet Core 5.0.4 seems incompatible with earlier Net 5 runtimes eg, 5.0.3

To Reproduce

  1. 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.

  2. Create a simple AspNet api from the template. WeatherForecast example would do.

  3. Build the api project.

  4. Run the generated <api>.exe or run the <api>.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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wtgodbecommented, Mar 17, 2021

The bundle is helpful for upgrades, however since we use all 3 runtimes, would we also need to ensure that desktop runtime is also upgraded along with AspNet since all will depend on .Net runtime at the core of it? I would try and test the scenario by this weekend. I believe the confusion here is mainly due to it being a patch version but would be happy to understand the thoughts on it?

If you’d like to install all 3, we recommend you install the SDK, which carries with it all 3 runtimes. You can also find that on the left side of the page I linked above.

0reactions
dougbucommented, Jun 7, 2021

@touchofevil2 thank you for your feedback. We’re closing this issue as the questions asked here have been answered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET 5.0 will reach End of Support on May 10, 2022 - . ...
NET 5.0 SDK versions will continue to be supported in VS 16.11 until December of 2022 when .NET Core 3.1 goes out of...
Read more >
NuGet Package Manager attempting to add .NET 5.0 ...
NET 5.0 version packages via the Nuget Package Manager, Or update an existing ASP.NET Core 3.1 project (and the packages) to ASP.NET 5.0....
Read more >
Running .NET Core Apps on a Framework other than ...
It fails to run due to the missing .NET Core 2.1 runtime. Notice that the error message is pretty helpful and shows what...
Read more >
Trying to use .NET Core. Tool installs failing because of . ...
I haven't used .NET in a long time so trying to get back into the ecosystem again. I have uninstalled all .NET Framework...
Read more >
.NET core vs .NET framework
Wondering about the difference between .NET Core & .NET Framework? Here's a quick guide on how to pick the right runtime environment for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found