The framework ‘Microsoft.AspNetCore.App’, version ‘5.0.0’ was not found. when it is installed and inside $PATH

I had the same problem. You need to have an ASP.NET runtime.

It’s a bit confusing and easily overlooked, but it says you need an Microsoft.AspNetCore.App runtime, and your dotnet --list-runtimes only lists Microsoft.NETCore.Apps.

The ArchWiki mentions:

This is caused because the runtime is shipped as a separate package in Arch. You just need to make sure you have the aspnet-runtime package installed as well.

To install the .NET 5 runtime:

sudo pacman -Sy aspnet-runtime

or if you need the 3.1 version:

sudo pacman -Sy aspnet-runtime-3.1

Now there’s an ASP runtime available:

$ dotnet --list-runtimes
Microsoft.AspNetCore.App 5.0.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]  # <<<
Microsoft.NETCore.App 5.0.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Leave a Comment