Skip to content

Omnisharp crashes while opening folder #9796

Description

@mkorsukov

Environment data

Env Version
OS Ubuntu 26.04
.NET 10.0.11
VS Code 1.134.0
C# extension 2.160.4

C# logs

OmniSharp server started with .NET 10.0.111
.
    Path: /home/max/.vscode/extensions/ms-dotnettools.csharp-2.160.4-linux-x64/.omnisharp/1.39.14-net6.0/OmniSharp.dll
    PID: 4323

[STDERR] System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln, .slnf) file. (Parameter 'path')
   at OmniSharp.Services.OmniSharpEnvironment..ctor(String path, Int32 hostPid, LogLevel logLevel, String[
[STDERR] ] additionalArguments) in /home/vsts/work/1/s/src/OmniSharp.Host/Services/OmniSharpEnvironment.cs:line 38
   at OmniSharp.CommandLineApplicationExtensions.CreateEnvironment(CommandLineApplication application) in /home/vsts/work/1/s/src/OmniSharp.Host/CommandLineApplicationExtensions.cs:line 12
   at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.<Main>b__1() in /home/vsts/work/1/s/src/OmniSharp.Stdio.Driver/Program.cs:line 49
   at OmniSharp.CommandLineApplication.<>c__DisplayClass13_0.<OnExecute>b__0() in /home/vsts/work/1/s/src/OmniSharp.Host/CommandLineApplication.cs:line 98
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.<OnExecute>b__0(CancellationToken _)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at OmniSharp.CommandLineApplication.Execute(String[] args) in /home/vsts/work/1/s/src/OmniSharp.Host/CommandLineApplication.cs:line 68
   at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_0.<Main>b__0() in /home/vsts/work/1/s/src/OmniSharp.Stdio.Driver/Program.cs:line 84
   at OmniSharp.HostHelpers.Start(Func`1 action) in /home/vsts/work/1/s/src/OmniSharp.Host/HostHelpers.cs:line 30

Steps to reproduce

  1. Open a folder with solution file (slnx) and projects)
  2. See output tab in VS Code
Image

Expected behavior

Solution discovered and projects loaded as before.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions