vscode-csharp
vscode-csharp copied to clipboard
Error connecting to the language server
Type: Bug
Issue Description
Starting VSCode with a newly generated C# console app and the C# and the C# Dev Kit installed leads to the following error:
Using dotnet configured on PATH
Dotnet path: C:\Program Files\dotnet\dotnet.exe
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[stdout] {"pipeName":"\\.\pipe\f2903b47"}
received named pipe information from server
attempting to connect client to server...
[Error - 2:10:49 PM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: Timeout. Client cound not connect to server via named pipe: \.\pipe\f2903b47
at q.
Steps to Reproduce
Occurs at every start
Expected Behavior
Connect to language server via named pipe
Actual Behavior
Does not connect, runs into timeout
Logs
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.86.0 C# Extension: 2.15.30 Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.200-preview.23624.5 Commit: 8065b9770c Workload version: 8.0.200-manifests.66f5ce51Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.200-preview.23624.5\
.NET workloads installed: Workload version: 8.0.200-manifests.66f5ce51 [maui-windows] Installation Source: VS 17.8.34511.84, VS 17.9.34511.98 Manifest Version: 8.0.3/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.3\WorkloadManifest.json Install Type: Msi
[maccatalyst] Installation Source: VS 17.8.34511.84, VS 17.9.34511.98 Manifest Version: 17.2.8004/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.2.8004\WorkloadManifest.json Install Type: Msi
[ios] Installation Source: VS 17.8.34511.84, VS 17.9.34511.98 Manifest Version: 17.2.8004/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.2.8004\WorkloadManifest.json Install Type: Msi
[android] Installation Source: VS 17.8.34511.84, VS 17.9.34511.98 Manifest Version: 34.0.52/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.52\WorkloadManifest.json Install Type: Msi
[aspire] Installation Source: VS 17.9.34511.98 Manifest Version: 8.0.0-preview.1.23557.2/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0-preview.1.23557.2\WorkloadManifest.json Install Type: Msi
Host: Version: 8.0.1 Architecture: x64 Commit: bf5e279d92
.NET SDKs installed: 8.0.101 [C:\Program Files\dotnet\sdk] 8.0.200-preview.23624.5 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download
Visual Studio Code Extensions
| Extension | Author | Version | Folder Name |
|---|---|---|---|
| csdevkit | ms-dotnettools | 1.3.10 | ms-dotnettools.csdevkit-1.3.10-win32-x64 |
| csharp | ms-dotnettools | 2.15.30 | ms-dotnettools.csharp-2.15.30-win32-x64 |
| powershell | ms-vscode | 2024.0.0 | ms-vscode.powershell-2024.0.0 |
| rest-client | humao | 0.25.1 | humao.rest-client-0.25.1 |
| vscode-dotnet-runtime | ms-dotnettools | 2.0.1 | ms-dotnettools.vscode-dotnet-runtime-2.0.1 |
| vscodeintellicode-csharp | ms-dotnettools | 0.1.26 | ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64 |
Extension version: 2.15.30 VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:28:19.990Z) OS version: Windows_NT x64 10.0.22631 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2803) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | undefined |
| Memory (System) | 23.73GB (11.90GB free) |
| Process Argv | --crash-reporter-id f1f183bb-8241-4071-8770-73d9ca064142 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
pydisww2:30959801
dsvsc019b:30953937
8082a590:30958339
b5d27386:30958190
3ef8e399:30949928
bg6jg535:30958357
One thing to try - if you increase the connection timeout by updating the dotnet.server.startTimeout in vscode settings to something like 60000 (or even higher), does it work?
Closing, this is almost certainly a duplicate of https://github.com/dotnet/vscode-csharp/issues/6842. If this still reproduces on the latest versions of the extension, feel free to re-open and include the latest logs.