33

After upgrading targetFramework for my web app from dotnet-core-2.2 to dotnet-core-3.1.2 on another developer machine we are getting following error

It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.1.3' 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.3&arch=x64&rid=win10-x64

We have tried several approaches to solve the issue

still we are facing the same issue, please guide me to troubleshoot this issue.

5
  • 1
    Can you show us the output of dotnet --info? Commented May 8, 2020 at 15:23
  • @OmairMajid part 1 of output .NET Core SDK : Version: 3.1.201 Commit: b1768b4ae7 Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.201\ Host (useful for support): Version: 3.1.3 Commit: 4a9f85e9f8 .NET Core SDKs installed: 1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk] 1.1.0 [C:\Program Files\dotnet\sdk] 2.1.513 [C:\Program Files\dotnet\sdk] 3.1.100 [C:\Program Files\dotnet\sdk] 3.1.201 [C:\Program Files\dotnet\sdk] Commented May 8, 2020 at 15:51
  • Is that the complete output? Can you add it to the question, please? Commented May 8, 2020 at 15:53
  • part 2 of output .NET Core runtimes installed: Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Commented May 8, 2020 at 15:53
  • part 3 of output Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Commented May 8, 2020 at 15:54

11 Answers 11

38

I solved the problem by installing the Hosting bundle from here.

Sign up to request clarification or add additional context in comments.

1 Comment

What a simple and highly effective answer. I was moving a Blazor Web Assembly project from my desktop to my laptop and doing the above was one click (clicked on "Hosting bundle" and then it auto downloaded and done. Now my application is working. Thank you!
21

I have posted same question on github dotnet issues page, the user vitek karas provided me the lead that x64 runtime C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App\3.1.3 folder was missing.

Then I tried reinstalling SDK 3.1.201 still folder was missing.

I also tried install aspnetcore-runtime-3.1.3 X64 still folder was missing.

finally I have downloaded dotnet-sdk-3.1.201-win-x64.zip and copied Microsoft.AspNetCore.App\3.1.3 folder manually from the zip file to C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App\3.1.3 then my asp.net core application started working .

5 Comments

Is this a bug? I have exactly the same problem and have to manually copy the files.
This also worked for me, thanks. Out of interest, is anyone else having this problem when they already have SDK v5 installed? I'm wondering if that is one of the causes.
Solved for me as well by installing SDK: choco install dotnet-sdk -y
I get this error on mac :| what should I do there?
This worked for me with 3.1.32 after the hosting bundle method failed, only addition to your instruction was I had to also copy the shared\Microsoft.NETCore.App to it's corresponding Program Files\dotnet\shared\ folder.
8

If you have visual studio installer then open that and click on modify then click individual components and click on .net core 3.1 checkbox and then click modify. Tick the .net Core 3.1(LTS). It will install in the path C:\Program Files\dotnet\shared both Microsoft.AspNetCore.App\3.1.X and Microsoft.NETCore.App\3.1.X that are required

enter image description here

Comments

3

I had a similar issue with dotnet-ef package. I was developing using .NET 5 and the already installed dotnet-ef package was at 3.1.0 version.

Solution:

  • Uninstall deprecated package globally (I am on Linux so I use dotnet CLI)
dotnet tool uninstall dotnet-ef -g
  • Reinstall up-tp-date package version:
dotnet tool install --global dotnet-ef --version 5.0.1 

Comments

2

Installing the .net core 3.1 runtime via visual studio setup worked for me:

enter image description here

Comments

1

Execute dotnet --version in cmd and check whether the correct version (3.1.201) is installed. It is referring to the .NET Core Runtime version, not the sdk version. Your application now having the latest versions.

sdk 3.1.201 - runtime 3.1.3

5 Comments

the version .NET Core SDK (3.1.201) when I execute it in cmd
dotnet --info to check the correct runtime. Maybe your sdk is conflicting with a lower version. Try keeping only the latest version and check. Remove others
still no luck after removing other versions
Can u send the repo that would help to find out the issue
Thank you for your help C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App\3.1.3 folder was missing I got lead from github dotnet issue page .
1

Just ran into this on a Manjaro-x64 laptop:

Building the application with dotnet build was fine but whenever I attempted to dotnet run the api or dotnet test I'd be greeted by errors:

$> dotnet test
  Determining projects to restore...
  Restored /home/ralves/src/todoer/Todoer.Api/Todoer.Api.csproj (in 255 ms).
  Restored /home/ralves/src/todoer/Todoer.Tests/Todoer.Tests.csproj (in 338 ms).
  Todoer.Api -> /home/ralves/src/todoer/Todoer.Api/bin/Debug/net7.0/linux-x64/Todoer.Api.dll
  Todoer.Tests -> /home/ralves/src/todoer/Todoer.Tests/bin/Debug/net7.0/linux-x64/Todoer.Tests.dll
Test run for /home/ralves/src/todoer/Todoer.Tests/bin/Debug/net7.0/linux-x64/Todoer.Tests.dll (.NETCoreApp,Version=v7.0)
Microsoft (R) Test Execution Command Line Tool Version 17.4.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process for source(s) '/home/ralves/src/todoer/Todoer.Tests/bin/Debug/net7.0/linux-x64/Todoer.Tests.dll' exited with error: You must install or update .NET to run this application.
App: /home/ralves/src/todoer/Todoer.Tests/bin/Debug/net7.0/linux-x64/testhost.dll
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '7.0.0' (x64)
.NET location: /usr/share/dotnet/
No frameworks were found.
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=7.0.0&arch=x64&rid=manjaro-x64
. Please check the diagnostic logs for more information.

Turns out that installing the dotnet-sdk-bin and dotnet-runtime-bin AURs weren't enough. After digging around Google I ran across the official documentation for runtime discovery and noticed that the aforementioned error message mentioned the 'Microsoft.AspNetCore.App' runtime, which lead me into the aspnet-runtime-bin AUR that finally made things work as expected.

1 Comment

Thanks, this pointed me into the correct location to look. Also, do note that you have dotnet toolchain available in regular arch channels (community) so no need for the AUR versions AFAIK
0

I am targeting 3.1.101 and had this same error.

I resolved this issue by un-installing 3.1.2 shared framework (installed by someone else unbeknown to me)

The takeaway is, try to only have the version you require otherwise .NET seems to get confused.

Comments

0

Install the .net core hosting will resolve the issue

Comments

0

Having similar situation I did:

  1. update docker
  2. update vs
  3. install latest SDK

Then it started to work and resolved few more issues related to or caused by docker tooling

2 Comments

If you could edit your answer and add a description on how to do those three steps, that would improve your question a lot.
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
0

I had the same issue - HTTPTrigger not found..

https://adamstorr.azurewebsites.net/blog/azure-functions-cli-failing-after-preview-install - I set the global json sdk to 3.1.1 - it started working

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.