Execute Sensor: OmniSharp ... Timeout waiting for the solution to be loaded

Please provide

  • Operating system: WSL Ubuntu 20.04.6 LTS
  • SonarQube for VS Code plugin version: 4.19.0
  • Programming language you’re coding in: C#
  • Is connected mode used:
    • SonarQube Community: SonarQube ID information
      Server ID: (redacted)
      Version: 25.2.0.102705
      Date: 2025-04-01

SonarQube for IDE works fine for TypeScript projects, the problems in the IDE reflect the same problems in the server.

SonarQube for IDE fails each time for C# projects, no problems from sonarlint are listed. On the server, yes, we see them there.

Verbose logs shows the following error:

[Debug - 15:36:12.066] [sonarlint : sonarlint-analysis-engine] Execute Sensor: OmniSharp
[Trace - 3:36:12 PM] Received notification ‘window/logMessage’.
Params: {
“type”: 4,
“message”: “[Error - 15:36:12.066] [org.sonarsource.sonarlint.omnisharp.OmnisharpSensor : sonarlint-analysis-engine] Timeout waiting for the solution to be loaded. You can find help on Scan my project - SonarQube for IDE Documentation - IntelliJ or Requirements - SonarQube for IDE Documentation - VS Code
}

I have followed instructions at the getting-started link above.
JRE is 17+
VSCode is 1.98.2
C# Dev Kit is not installed (intentionally removed)
C# Base language support is installed
.NET runtime is version 8.0.12

  • omnisharp.useModernNet is true
  • omnisharp.enableMsBuildLoadProjectsOnDemand is false
  • omnisharp.projectLoadTimeout is 60
  • dotnet.defaultSolution is empty but I have tried entering the full solution path with no difference

FWIW, the SonarQube for IDE plugin does work my Windows 11 instance with Visual Studio for the same C# project. There, I am able to see the C# problems listed both locally and on the server. This tell me the server connection is good, the project settings are configured correctly, and it can otherwise function without issues.

Only VSCode on WSL seems broken.

Thanks,

Hi there @dpetrizze , welcome to Sonar Community! :waving_hand: :sonar:

Thanks a lot for the report and all the details :person_bowing: Looks like, for some reason Omnisharp project loading times out on WSL and not on your machine.

Could you try to add the following setting to your USER settings JSON and see how it goes?

    "sonarlint.analyzerProperties": {
       "sonar.cs.internal.loadProjectsTimeout": "120"
    },

Best,
Sophio

Hello Sophio, thank you for the quick response. Unfortunately, this option doesn’t appear to have any effect.

It may also be interesting to note that the error shows up immediately, without any apparent delay of any sort. To duplicate the issue, I clear the SonarQube for IDE output window, open the .cs file, and immediate in the logs I see the error. There is no indication of which solution it is attempting to load or any indication that it is delayed in doing so.

Thanks for giving it a go. :person_bowing:

Would you be able to share with us the full logs (starting from the moment you open VS Code, NOT when you open the file)? This is to make sure that .NET runtime is properly available, and nothing is going wrong at startup.

It might also be helpful to set

    "sonarlint.analyzerProperties": {
       "sonar.cs.internal.loadProjectsOnDemand": true
    },

As per our docs.

All the best,
Sophio

Hello Sophio, Thanks again for reviewing this issue. I have sent the full logs to the community@sonarsource email address. Hopefully, you are able to see it.

1 Like

setting the loadProjectsOnDemand property appears to have resolved the issue. After setting to true, I am now seeing analysis results in the IDE.

1 Like