Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found." #118

Closed
simendsjo opened this issue Jan 25, 2020 · 13 comments
Closed

Comments

@simendsjo
Copy link

simendsjo commented Jan 25, 2020

Looking at the published nuget package, this seems to be correct as I only see netcoreapp2.2 at nuget: https://www.nuget.org/packages/Microsoft.AspNetCore.App

The documentation, https://fsbolero.io/docs/, states that "version 3.0.0 or newer" is required. (EDIT: I'm trying 3.1.100)
Looking at the generated references, it includes a lot of preview stuff.

Does the project work atm? Anything I'm missing from the documentation?

@Tarmil
Copy link
Member

Tarmil commented Jan 25, 2020

I only see netcoreapp2.2 at nuget: https://www.nuget.org/packages/Microsoft.AspNetCore.App

This is because starting with version 3, the core App packages are not distributed via NuGet anymore, but built-in with the SDK. So if you have installed the 3.1.100 SDK, then you shouldn't have such issues. Do you maybe have a global.json file that points to an older SDK?

The documentation is outdated, sorry about that, I'll fix it quickly.

@simendsjo
Copy link
Author

$ dotnet --version
3.1.100

$ dotnet new bolero-app -o MyApp
The template "Bolero Hosted Application" was created successfully.

$ cd MyApp
$ dotnet --version
3.1.100

$ dotnet run -p src/MyApp.Server/
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.
  - No frameworks were found.

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.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=manjaro-x64

MyApp.Server.fsproj includes

  <ItemGroup>
    <ProjectReference Include="..\MyApp.Client\MyApp.Client.fsproj" />
    <PackageReference Include="Bolero.Server" Version="0.11.22-preview31" />
    <PackageReference Include="Bolero.HotReload.Server" Version="0.11.5-preview31" />
    <PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="3.1-preview4.19579.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1" />
  </ItemGroup>

@Tarmil
Copy link
Member

Tarmil commented Jan 25, 2020

I just successfully ran the same sequence of commands with version 3.1.101 on both Windows and Ubuntu. What system are you on? Can you try to upgrade to 3.1.101?

@simendsjo
Copy link
Author

Just tried 3.1.101, and I get the same behavior. This is on Manjaro, but I installed 3.1.101 from Arch AUR. I've experimented a bit with paket and removing some restrictions, but I'm unable to get it building.

@Tarmil
Copy link
Member

Tarmil commented Jan 25, 2020

What output do you get for dotnet --info? If you don't see a Microsoft.AspNetCore.App 3.1.* under ".NET Core runtimes installed", then I'm guessing it's not looking at the right place. In this case the fix would be to point the DOTNET_ROOT environment variable to wherever the AUR package installed dotnet. It seems to be /usr/share/dotnet: I see that the AUR archive contains a script that does that.

@simendsjo
Copy link
Author

.NET Core SDK (reflecting any global.json):
 Version:   3.1.101
 Commit:    b377529961

Runtime Environment:
 OS Name:     manjaro
 OS Version:  
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.101/

Host (useful for support):
  Version: 3.1.1
  Commit:  a1388f194c

.NET Core SDKs installed:
  3.1.101 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

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

DOTNET_ROOT wasn't set for 3.1.101, but it doesn't seem to make any difference.

$ DOTNET_ROOT=/usr/share/dotnet dotnet run -p src/MyApp4.Server/ -v m
  Restore completed in 60.48 ms for /home/simendsjo/code/tmp/MyApp4/src/MyApp4.Server/MyApp4.Server.fsproj.
  Restore completed in 60.49 ms for /home/simendsjo/code/tmp/MyApp4/src/MyApp4.Client/MyApp4.Client.fsproj.
  MyApp4.Client -> /home/simendsjo/code/tmp/MyApp4/src/MyApp4.Client/bin/Debug/netstandard2.1/MyApp4.Client.dll
  MyApp4.Server -> /home/simendsjo/code/tmp/MyApp4/src/MyApp4.Server/bin/Debug/netcoreapp3.1/MyApp4.Server.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.
  - No frameworks were found.

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.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=manjaro-x64

Am I supposed to have a Microsoft.AspNetCore.App.dll? Who is referencing this? I'm new to dotnet core :/

I have a lot of dlls like the following: /usr/share/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.1.0/ref/netcoreapp3.1/Microsoft.AspNetCore.dll
But no Microsoft.AspNetCore.App.dll.

While there are lots of preview versions in the project files, this one is just pinning 3.1: <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1" />. I also notice that the latest prerelease version for this package is 3.1.0-preview3.19555.2, but the other prerelease versions references is 3.1-preview4.19579.2.

@Tarmil
Copy link
Member

Tarmil commented Jan 25, 2020

Under .NET Core runtimes, there's Microsoft.NETCore.App, but not Microsoft.AspNetCore.App. I think that's the issue. There must be a separate AUR package to install for ASP.NET Core.

@simendsjo
Copy link
Author

Under .NET Core runtimes, there's Microsoft.NETCore.App, but not Microsoft.AspNetCore.App. I think that's the issue. There must be a separate AUR package to install for ASP.NET Core.

Ah, thanks! I'm a bit blind it seems, and didn't notice the "Asp" difference in the runtime part. Sorry to steal your time with such a silly user error.

@Perustaja
Copy link

Know this is old but in-case anyone stumbled upon this, the package is aspnet-runtime in the Community repo currently.

@IvanArantes
Copy link

Know this is old but in-case anyone stumbled upon this, the package is aspnet-runtime in the Community repo currently.

Thank you very much! And also Tarmil for noticing the problem. I was stucked in this too..

@Neroli-realy
Copy link

Know this is old but in-case anyone stumbled upon this, the package is aspnet-runtime in the Community repo currently.

thanks i was stuck at this error too.. same OS.

@Jvaldez10
Copy link

Thank you, and solve problem in ARCH LINUX sudo pacman -S aspnet-runtime

@eramax
Copy link

eramax commented Sep 23, 2020

Thanks guys, I had to install aspnet-runtime package to enable my asp.net app to run

https://aur.archlinux.org/packages/aspnet-runtime-bin

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants