dotnet / dotnet/vscode-csharp

C# Dev Kit fails to start Roslyn Language Server on Linux (.NET 9.0.1) due to invalid argument `---logLevel`

Open
#8,718 2 comments 0 reactions 1 assignee Claimed by @dibarbet View on GitHub
Roslyn LSP untriaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

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
1. Install .NET 9.0.1 on Ubuntu 24.04
2. Install VS Code + C# Dev Kit extension (2.96.3)
3. Open any C# project
4. Extension tries to start Roslyn Language Server
5. 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:
```bash
/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.

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.