skip to Main Content

I’m trying to setup a backend on my local computer I have installed the v6 dotnet everything is installed but when i run dotnet run
I get this error

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:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet-download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

dotnet –info

PS C:UsersAzbazaar-onlineServerSrcBazaarOnline.API> dotnet --info

global.json file:
  Not found

Host:
  Version:      6.0.7
  Architecture: x86
  Commit:       0ec02c8c96

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.7 [C:Program Files (x86)dotnetsharedMicrosoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.7 [C:Program Files (x86)dotnetsharedMicrosoft.NETCore.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info

I searched a lot but i didn’t find anything useful.
reinstalled everything tried v3 but didn’t fix anything

I have installed these files.

dotnet-hosting-6.0.7-win
dotnet-runtime-6.0.7-win-x64
dotnet-sdk-6.0.302-win-x64

3

Answers


  1. Chosen as BEST ANSWER

    Ok This fixed the problem for me

    I went to the C:Program Files (x86)dotnet

    and deleted everthing in the folder

    and than vscode recognized the dotnet sdk.


  2. The command could not be loaded, possibly because:

    • You intended to execute a .NET application:
      The application ‘myapp.dll’ does not exist.
    • You intended to execute a .NET SDK command:
      No .NET SDKs were found.

    Download a .NET SDK:
    https://aka.ms/dotnet-download

    Learn about SDK resolution:
    https://aka.ms/dotnet/sdk-not-found
    use this commands
    1.sudo apt remove dotnet*
    2.sudo apt remove aspnetcore*
    3.sudo rm /etc/apt/sources.list.d/microsoft-prod.list
    4.sudo apt update
    5.sudo apt install dotnet-sdk-6.0

    Login or Signup to reply.
  3. I just had this same issue when I wanted to install a new template dotnet new -i "Falco.Template::*". Simply reinstalling the dotnet 6 SDK solved it for me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search