0

I downloaded this C# extension from Visual Studio Code Extension Store and dotnet as well.But, the extension cannot detect my dotnet core SDK. enter image description here (I want to learn C# language,but the problem has been haunting me for days)

The .NET Core SDK cannot be located: A valid dotnet installation could not be found. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.

Cannot create .NET debug configurations. The active C# project is not within folder 'c:\Users\xxx\OneDrive\Desktop\project\idk'.

I have downloaded dotnet several times and I also checked the version of visual studio code, it is v1.80.Dotnet Core SDK i downloaded is .NET7.0 SDK (v7.0.305) . I closed my visual studio code and download dotnet again and then restart visual studio code again,I saw this method at The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path, but it doesn't work.

Pls help me to solve this issue. Thank you very much

not C
  • 1
  • Open a command prompt (or use VSCode terminal) and run `dotnet --list-sdks` and `dotnet --list-runtimes` to see if they are in your PATH. Also try to not use OneDrive to store your code, it may be intefering with/blocking some files. Put your code in C:\code or something for now. – LoLo2207 Jul 10 '23 at 08:31

0 Answers0