-
Notifications
You must be signed in to change notification settings - Fork 727
Open
Description
Environment data
- OS: Ubuntu 24.04 (x86_64)
- .NET SDK: 9.0.1
- VS Code: 1.105.0
- C# Extension: ms-dotnettools.csharp-2.96.3
C# logs
2025-10-24 11:23:12.541 [error] [stderr] Could not execute because the specified command or file was not found. 2025-10-24 11:23:12.542 [info] [stdout] Possible reasons for this include:
You intended to execute a .NET program, but dotnet---logLevel does not exist. Language server process exited with 1
Steps to reproduce
- Install .NET 9.0.1 on Ubuntu 24.04
- Install VS Code + C# Dev Kit extension (2.96.3)
- Open any C# project
- Extension tries to start Roslyn Language Server
- Server fails with
dotnet---logLevel does not exist
Expected behavior
The Roslyn Language Server should start normally with --logLevel argument.
Actual behavior
The extension passes ---logLevel (three dashes) instead of --logLevel (two dashes).
This causes dotnet to treat it as an invalid command and the server exits immediately.
Additional context
- Running the server manually with:
/home/yazn/.dotnet/dotnet exec \ ~/.vscode/extensions/ms-dotnettools.csharp-2.96.3/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll \ --logLevel Information \ --extensionLogDirectory /tmp/roslyn-logs \ --stdio
works correctly.
This suggests a bug in how the extension constructs the command-line arguments.
Proposed fix
Ensure the extension uses the correct argument format
- ---logLevel
- --logLevel
and always provides the required --extensionLogDirectory parameter when launching the Roslyn Language Server.