Skip to content

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

@yazn999darwish

Description

@yazn999darwish

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:
    /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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions