Runtime: Arch Linux: It was not possible to find any compatible framework version. The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.

Created on 10 Jun 2018  路  13Comments  路  Source: dotnet/runtime

Steps to reproduce

  1. Install latest SDK聽(v2.1.300) and Runtime聽(v2.1.0)
  2. Create webapp with: 'dotnet new web'
  3. Run it with: 'dotnet run'

Expected behavior

Running app

Actual behavior

$ dotnet new web
The template "ASP.NET Core Empty" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /tmp/jebacmicrosoft/jebacmicrosoft.csproj...
  Restoring packages for /tmp/jebacmicrosoft/jebacmicrosoft.csproj...
  Generating MSBuild file /tmp/jebacmicrosoft/obj/jebacmicrosoft.csproj.nuget.g.props.
  Generating MSBuild file /tmp/jebacmicrosoft/obj/jebacmicrosoft.csproj.nuget.g.targets.
  Restore completed in 393.31 ms for /tmp/jebacmicrosoft/jebacmicrosoft.csproj.

Restore succeeded.
$聽dotnet run 
Using launch settings from /tmp/jebacmicrosoft/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      /opt/dotnet/
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download

Environment data

_$ dotnet --info_

.NET Core SDK (reflecting any global.json):
 Version:   2.1.300
 Commit:    adab45bf0c

Runtime Environment:
 OS Name:     arch
 OS Version:
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /opt/dotnet/sdk/2.1.300/

Host (useful for support):
  Version: 2.1.0
  Commit:  caa7b7e2ba

.NET Core SDKs installed:
  2.1.300 [/opt/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 2.1.0 [/opt/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
area-Host

Most helpful comment

@natemcmaster I feel like I can inform you that this behavior is still a thing in 2020. Particularly in manjaro distro. I was troubleshooting this for a whole day when finally find out that aspnetcore-runtime must be installed separately (which called aspnet-runtime btw in arch)
I just have no words it was terrible experience, 10 years passed and linux still have awful UX on any distro.

All 13 comments

It seems Arch Linux is not supported. It is not surprising, because all microsoft's products are shitty.

Can you send us a trace file for why it was not found? export COREHOST_TRACE=1 then run dotnet run. Thanks

@steveharter can you take a look? The logs shows that the initial dotnet run command found the appropriate netcoreapp 2.1.0 location:
--- Resolving FX directory, name 'Microsoft.NETCore.App' version '2.1.0'
Searching FX directory in [/opt/dotnet]
Attempting FX roll forward starting from [2.1.0]
'Roll forward on no candidate fx' enabled with value [1]. Looking for the least production greater than or equal to [2.1.0]
Found version [2.1.0]
But by the time the dotnet exec command executed it could not:
--- Resolving FX directory, name 'Microsoft.AspNetCore.App' version '2.1.0'
Searching FX directory in [/opt/dotnet]
Attempting FX roll forward starting from [2.1.0]
'Roll forward on no candidate fx' enabled with value [1]. Looking for the least production greater than or equal to [2.1.0]
No production greater than or equal to [2.1.0] found. Looking for the least preview greater than [2.1.0]
No preview greater than or equal to [2.1.0] found.
Applying patch roll forward from [2.1.0]
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.

The first two iterations of calling dotnet were successful:

Launch host: /opt/dotnet/dotnet, app: /opt/dotnet/sdk/2.1.300/dotnet.dll, argc: 1, args: run,
Launch host: /opt/dotnet/dotnet, app: /opt/dotnet/sdk/2.1.300/MSBuild.dll, argc: 6, args: -maxcpucount,-verbosity:m,-restore,/tmp/jebacmicrosoft/jebacmicrosoft.csproj,-nologo,-verbosity:quiet,

then it couldn't find 'Microsoft.AspNetCore.App' in the /opt/dotnet location and failed.

@natemcmaster @rowanmiller I assume this is a duplicate of issue regarding additional steps for installing the dotnet-hosting-2.1.0 bundle?

This looks like a separate issue.

@koxu1996 how did you install the runtime and SDK? Using a tarball, apt, yum, etc...

Also, this is interesting to me

Runtime Environment:
 OS Name:     arch
 OS Version:
 OS Platform: Linux
 RID:         linux-x64

Which distro of Linux are you using?

@natemcmaster I am using _Arch Linux_, so I installed it with single command:

pacman -S dotnet-sdk

Packages like _dotnet-runtime_ and _dotnet-host_ are installed as dependencies.

I have also checked packages' source (example) and they are using latest versions.

I see. It looks like the package maintainers need to update the dependencies of the dotnet-sdk package. In 2.1, we refactored the way aspnetcore is installed. On Debian and Redhat distros, the package graph looks like this:

dotnet-sdk-2.1 (v2.1.300)
 => dotnet-runtime-2.1 (v2.1.0)
 => aspnetcore-runtime-2.1 (v2.1.0)

It appears the Arch linux packaging is missing the dependency on the ASP.NET Core runtime.

@koxu1996 you can workaround this for now by manually fetching and installing the ASP.NET Core bits. aspnetcore-runtime-2.1.0-linux-x64.tar.gz. Extract this into /opt/dotnet/. This will add files into /opt/dotnet/shared/Microsoft.AspNetCore.App.

cc @livarcocc @leecow - do we have contacts with the maintainers of the Arch Linux packaging?

@natemcmaster Indeed it works after installing _aspnetcore-runtime-2.1_. I will contact package maintainer. Thanks for help.

I haven't had contact with the Arch Linux maintainers.

Ok, I'll start an email thread with the maintainers listed here: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/dotnet-sdk

@natemcmaster I feel like I can inform you that this behavior is still a thing in 2020. Particularly in manjaro distro. I was troubleshooting this for a whole day when finally find out that aspnetcore-runtime must be installed separately (which called aspnet-runtime btw in arch)
I just have no words it was terrible experience, 10 years passed and linux still have awful UX on any distro.

@CaCTuCaTu4ECKuu experienced the same today, thank you for leading me to "aspnet-runtime"... linux word needs some guidance in these things...

Was this page helpful?
0 / 5 - 0 ratings