[Sandbox] It was not possible to find any compatible framework version

Copper Contributor

Got the sample code from github according to the instructions from Microsoft learning path. Edited the code necessary but could not run. The github location is https://github.com/MicrosoftDocs/mslearn-expose-hybrid-services-with-azure-relay. Herewith the error message:
____________________________________________________________________________________________________________________________
dotnet bin/Debug/netcoreapp2.2/listener.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.2.0' was not found.
- The following frameworks were found:
3.1.9 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

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.2.0&arch=x6...


This issue occurred in several learning contents which stop me from continuing my study.

Kindly assist.

Thank you.

6 Replies
حاول البداية من جديد

I'm experiencing the same issue.  Watching for some assistance.  

@gracechen the following work around worked in my case.

 

Locate the .csproj file (might be more than one, in which case do the same to each)

Locate the following line

<TargetFramework>netcoreapp2.2</TargetFramework>

Change it to 

<TargetFramework>netcoreapp3.1</TargetFramework>

Save, Close and Try again

 

Hope this helps

@gracechen 

I have the same issue and can not accomplish some of my learn sandbox tests because of that.

 

The tip from @george1251 couldn't help this issue.