sdk icon indicating copy to clipboard operation
sdk copied to clipboard

SDK 5.0 net found when installed

Open ConnorKolan opened this issue 5 years ago • 2 comments

OS: Windows Problem encountered: https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/create

Like in issue #4605 I have installed the SDK and tried making a new hello world project, but when I type "dotnet new console -o myApp" VSCode gives me the following:

PS D:\Programme\VSCodeNetCoreTest> dotnet new console -o myApp
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
  * You intended to execute a .NET program:
      The application 'new' does not exist.
  * You intended to execute a .NET SDK command:
      It was not possible to find any installed .NET SDKs.
      Install a .NET SDK from:
        https://aka.ms/dotnet-download

I have added C:\Program Files\dotnet to PATH but it still wont work What am I doing wrong ?

ConnorKolan avatar May 06 '21 07:05 ConnorKolan

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost avatar May 06 '21 07:05 ghost

0

The exact details are discussed here: https://github.com/dotnet/sdk/issues/14916

TL:DR There were two dotnet.exe files in Program Files and Program Files(x86), that I had to delete both and reinstall via Visual Studio 2019 (porably not the only method).

Now there is only one dotnet.exe in Program Files and it finally works.

ConnorKolan avatar May 06 '21 08:05 ConnorKolan