dotnet / dotnet/vscode-dotnet-runtime

Weird path check for LanguageServer

Open
#2,150 5 comments 0 reactions 0 assignees View on GitHub
untriaged
Dominant language
TypeScript
Stars
209
Forks
455
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug.

I can't use the LSP features of the plugin

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

2025-02-26 21:48:17.210 [info] Locating .NET runtime version 8.0.10
2025-02-26 21:48:17.210 [info] [Error - 21:48:16] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
2025-02-26 21:48:17.210 [info] Error: ENOENT: no such file or directory, lstat '/home/my-user/]P0#191724'
at realpathSync (node:fs:2749:29)
at node:electron/js2c/node_init:2:5697
at /home/my-user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.8/dist/extension.js:2:61009
at Array.map ()
at t.DotnetPathFinder. (/home/my-user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.8/dist/extension.js:2:60983)
at Generator.next ()
at s (/home/my-user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.8/dist/extension.js:2:55966)
2025-02-26 21:56:31.734 [info] Locating .NET runtime version 8.0.10
2025-02-26 21:56:31.734 [info] [Error - 21:56:31] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
2025-02-26 21:56:31.734 [info] Error: ENOENT: no such file or directory, lstat '/home/my-user/]P0#191724'
at realpathSync (node:fs:2749:29)
at node:electron/js2c/node_init:2:5697
at /home/my-user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.8/dist/extension.js:2:61009
at Array.map ()
at t.DotnetPathFinder. (/home/my-user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.8/dist/extension.js:2:60983)
at Generator.next ()
at s (/home/my-user/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.8/dist/extension.js:2:55966)

### Reproduction Steps

I've used `dotnet new console -n test_console` command to create a .net project.
then `code test_console` to open it
then I've installed the following plugins in no particular order
* `ms-dotnettools.vscode-dotnet-runtime`
* `ms-dotnettools.csdevkit`
* `ms-dotnettools.csharp`

The only error I got is from the language server and I find this error really fishy.

I am working on ubuntu22.04, I've installed dotnet8 (runtime & SDK) via the apt repos.
dotnet version on my system is 8.0.112

### Expected Behavior

I would expect the language server to work as it's supposed to

### Exceptions & Errors (if any)

* Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
* Error: ENOENT: no such file or directory, lstat '/home/my-user/]P0#191724'

### .NET Install Tool Version

2.2.8

### Your operating system? Please provide more detail, such as the version and or distro above.

Linux

### VS Code Version

1.97.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.