sas lab in learn.microsoft.com not working

Michael Cadenillas 0 Reputation points
2024-09-29T16:32:00.74+00:00

dotnet run

The command could not be loaded, possibly because:

  • You intended to execute a .NET application: The application 'run' does not exist.
  • You intended to execute a .NET SDK command: A compatible .NET SDK was not found.

Requested SDK version: 7.0.400

global.json file: /home/mcadenillas/sas/global.json

Installed SDKs:

8.0.401 [/usr/share/dotnet/sdk]

Install the [7.0.400] .NET SDK or update [/home/mcadenillas/sas/global.json] to match an installed SDK.

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,702 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pradeep M 3,830 Reputation points Microsoft Vendor
    2024-09-30T04:02:50.0633333+00:00

    Hi Michael Cadenillas,

    I understand you're facing a .NET version mismatch in the Azure sandbox. Here’s how to resolve it:   

    If you can't install .NET 7.0, change your project to target .NET 8.0: 

    1.Access Cloud Shell: 

    Open Azure Sandbox 

    Launch Cloud Shell. 

    2.Navigate to Your Project: 

    cd ~/sas  # Adjust as needed
    

    3.Open the .csproj File: 

    code *.csproj
    

    4.Update the <TargetFramework>: Change this line: 

    <TargetFramework>net7.0</TargetFramework>
    

    to: 

    <TargetFramework>net8.0</TargetFramework>
    

    5.Check Other Configuration Files (e.g., gateway.json): You might also need to update the .NET version in other configuration files such as gateway.json. To do this, open the file and ensure the version is updated to .NET 8.0 where required.

    6.Save the Changes:After making the modification, save the file by pressing Ctrl + S or using the file menu. 

    7.Rebuild and run your app: 

    dotnet build
    dotnet run
    

    If these steps are helpful, please click "Upvote" and "Accept Answer" on this post. 

    If you continue to experience issues, please provide screenshots or additional details in the comments, and we will be happy to assist further. 

    Thank you. 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.