dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
137 stars 257 forks source link

DotNet not installed or not in Path #1424

Open bradykelly opened 1 year ago

bradykelly commented 1 year ago

Describe the bug

After installing the C# Dev Kit extension, I was prompted to install the .NET SDK. I accepted the prompt and was taken to the SDK download site in my browser. I downloaded and installed the SDK, then trued the .NET: New Project command in VS Code.

Please attach log file(s) here if you have any:

Please attach the log file located at c:\Users\ME\AppData\Roaming\Code\logs\20230928T195451\window1\exthost\ms-dotnettools.vscode-dotnet-runtime\DotNetAcquisition-ms-dotnettools.vscode-dotnet-runtime-1695951780134.txt. Note that this file may contain personal data:

Attached Logs

  1. DotNetAcquisition-ms-dotnettools.vscode-dotnet-runtime-1695951780134.txt

  2. DotNetAcquisition-ms-dotnettools.vscode-dotnet-runtime-1695951413899.txt

  3. DotNetAcquisition-ms-dotnettools.vscode-dotnet-runtime-1695925487084.txt

Extension Version: 0.4.10

Other Info:

Errors trying to create new project

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Error running dotnet --info: Error: Command failed: dotnet --info
'dotnet' is not recognized as an internal or external command,
operable program or batch file.

'dotnet' is not recognized as an internal or external command,
operable program or batch file.

The .NET Core SDK cannot be located: Error running dotnet --info: Error: Command failed: dotnet --info
'dotnet' is not recognized as an internal or external command,
operable program or batch file.

'dotnet' is not recognized as an internal or external command,
operable program or batch file.
. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.
Dotnet path: c:\Users\ME\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\7.0.11~x64\dotnet.exe
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[Error - 3:44:59 AM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: Timeout. Named pipe information not received from server.
    at Function.<anonymous> (c:\Users\ME\.vscode\extensions\ms-dotnettools.csharp-2.4.4-win32-x64\dist\extension.js:2:1441424)
    at Generator.next (<anonymous>)
    at s (c:\Users\ME\.vscode\extensions\ms-dotnettools.csharp-2.4.4-win32-x64\dist\extension.js:2:1431992)
[stdout] {"pipeName":"\\\\.\\pipe\\9ed1e2ed-7440-4d74-8324-01dc3e6cc914"}
received named pipe information from server

Reproduction Steps

  1. Run .NET: New project... command from command palette.

Expected behavior

I don't know, I have just installed the extension so I have never seen it working. I guess it should have created a folder/file structure for a C# project.

Exceptions & Errors (if any)

  1. Posted above under Other Info: Errors trying to create new project

Further technical details

nagilson commented 1 year ago

Thank you for filling out the report and taking the time to do so. 😄 If you try to run dotnet on the terminal, and dotnet --info, what do you get? Does it work after having rebooted the machine? It's possible the SDK install had not completed and was pending a reboot.

If not, this would be an interesting case of dotnet not being detected/installed correctly.

IllyaYushchenko commented 7 months ago

I have same problem with VScode running from WSL and dotnet managed by asdf.

dotnet --info gives this

`dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.418 Commit: 21f869269c

Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /home/ilyus/.asdf/installs/dotnet/6.0.418/sdk/6.0.418/

global.json file: Not found

Host: Version: 6.0.26 Architecture: x64 Commit: dc45e96840

.NET SDKs installed: 6.0.418 [/home/ilyus/.asdf/installs/dotnet/6.0.418/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.26 [/home/ilyus/.asdf/installs/dotnet/6.0.418/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.26 [/home/ilyus/.asdf/installs/dotnet/6.0.418/shared/Microsoft.NETCore.App]

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

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

nagilson commented 6 months ago

This seems like a different issue, thank you for reporting info though. Does asdf use distro or microsoft feeds, do you know this information? I would advise against using it and using the standard install instructions on the docs -- as the distro and microsoft feeds are the scenarios we know the most about and check to make sure work properly