c# – Visual Studio Code Cannot Locate .NET Core SDK
When I open my C# project in VS Code I get the Error message:
The .NET Core SDK cannot be located: Error running dotnet –info: It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: aka.ms/dotnet-download . .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.
I have downloaded and installed .NET 7.0 from the dotnet.microsoft.com website. When I run dotnet --info in CMD, it says it couldn’t find any .Net Core SDKs, but it finds .NET Core Runtimes.
I am using VS Code 1.82.2 and Windows 10.
I have tried closing and reopening VS Code, uninstalling and reinstalling .Net 7.0 (while VS Code was closed), uninstalling and reinstalling VS Code, and rebooting my pc. I have also tried writing the path of dotnet in VS Code setting “Omnisharp: Dotnet Path” and setting “useModernNet” to true.
I am quite new to coding, so I might’ve missed something obvious, but I have read and tried all suggestions I could find without any luck.
Read more here: Source link
