Cloud Shell: It was not possible to find any compatible framework version

Ali Asim Kazmi 31 Reputation points
2020-12-18T11:31:56.843+00:00

https://learn.microsoft.com/en-us/learn/modules/app-service-scale-up-scale-out/3-exercise-scale-a-web-app-manually?source=learn

Monitor the performance of the web app before scaling out

  • Run the client app. You'll see several messages appear as the clients start running, make reservations, and run queries. Allow the system to run for a couple of minutes. The responses will be slow, and soon the client requests will start to fail with HTTP 408 (Timeout) errors.

After I execute dotnet run the following error message appears

Blockquote It was not possible to find any compatible framework version. The framework 'Microsoft.NETCore.App', version '2.1.0' was not found. The following frameworks were found: 3.1.9 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Blockquote 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.NETCore.App&framework_version=2.1.0&arch=x64&rid=cbld.10-x64

What is the possible solution to this roadblock. Can i even update the framework version i cloud shell ?

Please point me to right resource if this question has already been answered. I tried googling it and did not anything helpful on stackoverflow.

Best

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,790 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Jeffrey Silverstone 151 Reputation points
    2020-12-24T18:12:31.497+00:00

    I got past it by going into HotelReservationSystemTestClient.csproj and substituting " <TargetFramework>netcoreapp3.1</TargetFramework>
    ", then build and run.

    30 people found this answer helpful.

  2. Rob 16 Reputation points
    2021-03-01T10:51:38.913+00:00

    Great question reflecting the need for some of the Microsoft Learn content to be reviewed a bit more often. Short answer is I'd follow
    @Jeffrey Silverstone answer and update your target framework BUT I was curious how to do actually update the installed SDK and after some digging I'd suggest using this approach https://learn.microsoft.com/en-us/learn/modules/host-a-web-app-with-azure-app-service/5-exercise-implement-a-web-application?pivots=csharp e.g.

    wget -q -O - https://dot.net/v1/dotnet-install.sh | bash -s -- --version 2.1.0  
    export PATH="~/.dotnet:$PATH"  
    echo "export PATH=~/.dotnet:\$PATH" >> ~/.bashrc  
    

    HOWEVER you'll run that and you'll get a 404 because .NET Core 2.1.0 is no longer supported so can't be downloaded via this

    dotnet_install: Error: Could not find .NET Core SDK with version = 2.1.0
    dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

    AND if you do run it for a newer version you'll see a warning:

    Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:

    • The SDK needs to be installed without user interaction and without admin rights.
    • The SDK installation doesn't need to persist across multiple CI runs.
      To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

    So I'm not 100% sure if its the best way and really it all just means you're back to the original suggestion of changing the target framework, but at least we tried!

    2 people found this answer helpful.

  3. Suprith A M 6 Reputation points Microsoft Employee
    2020-12-19T20:57:46.827+00:00

    I was able get through this by using Azure CLI local. You can try the same option with local azure CLI. Install Azure CLI (https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) and open the azure cli sign in to you account by using az login command.

    1 person found this answer helpful.

  4. Prafulla Girgaonkar 6 Reputation points
    2021-03-04T03:10:28.06+00:00

    I had similar issue in https://learn.microsoft.com/en-us/learn/modules/app-service-scale-up-scale-out/3-exercise-scale-a-web-app-manually

    I changed following code from HotelReservationSystemTestClient.csproj

    <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    </PropertyGroup>

    to

    <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    </PropertyGroup>

    It worked well

    1 person found this answer helpful.