Thank you for your detailed feedback and welcome to the community!
We will have a closer look at data you provided and will answer here in this topic. It can take some time.
Have a good day!
Thanks for sharing the logs, it is helpful. I see no errors, but we have defined a 1 minute timeout for loading the solution. It seems in your case it takes too much time:
Caused by: java.lang.IllegalStateException: Timeout waiting for solution/project configuration to be loaded
More questions:
How big is your solution?
Do you have many projects, and/or many dependencies?
Anything special about your project (is it a Unity project maybe?).
When you look at the SonarLint log tab, can you determine if the OmniSharp process is āstuckā or is there some work going on until the 1 minute timeout?
Can you try to open your project in VSCode (with the VSCode C# extension) and see if you manage to have intellisense.
Thatās interesting. Itās not a large project. Is there a way of extending the timeout perhaps?
The solution contains 8 projects. There arenāt a lot of source files. The projects are .NET core. No UI. Definitely not a Unity project. It does seem as if everything is running and then suddenly stops. Iām wondering if this timeout is just too low for serious work.
That is part of the feedback we were interesting to receive. There is currently no way for you to increase the timeout, but this is something we can change in the next release.
Except if you can share the project with me, may I ask you to do this test for me:
Unfortunately the security settings wonāt allow me to run the Mono libraries on my laptop.
Thus I canāt provide you with the output of the run command.
I can say that we run SonarCloud from CircleCI and the run takes 8 minutes. Not sure if that helps. I can even give you that log output if that helps.
Then I think this is the root cause of your issue. SonarLint relies on OmniSharp to execute our C# roslyn based analyzer. And so far OmniSharp runs on Mono (I know there are some initiative to move it to .Net Core, but I donāt know the ETA).
Any chance you could try to open the same project on a computer with less restriction, and see if that work better?
Ok, I got around the security issue so the run now operates properly. It seems to move quickly to the first Project add. Immediately in fact. However I still get the same timeout within the IDE. Thus I think there is some other issue.
The SonarLint logs are still truncated (we donāt see when OmniSharp starts), but that may be caused by the too numerous occurences of Can't find custom attr constructor image.
Anyway, this is good to know that running OmniSharp standalone loads your project very fast, but not when it is called by SonarLint. I will try to investigate if we are not slowing down the process when consuming the stdio streams.
I tried to reproduce a possible slowness when OmniSharp is producing a lot of logs, but I was not able. Is there any chance you could try to create a reproducer that you could share with me? Maybe try to remove most source code (keep only one dummy class per project) and see if the problem is still there.
I also created a ticket to update OmniSharp to the latest version, but I have no guarantee it will change anything to your problem.
I face the same issue and I can confirm that for me time to get the āProjectAddedā event is 2-3 minutes. I guess I have to wait until the timeout will be extended/configurable but would it be an option to actually connect to a running OmniSharp instance somhow?
Unfortunately, I have the same issue. As @Nadarian mentioned for me also āProjectAddedā event takes more time to load. Hope you will do sth with that in the near future. We will wait for the information.
I would like to avoid increasing the timeout, since I believe waiting more than 1 minute before getting the first issues reported is not a nice user experience. But maybe this could be a temporary solution.
Ok, but this is NOT a big project. I recall a C# front-end to a Trading System that is an order of magnitude larger. This means for any real C# system this plugin is useless. Thatās basically what this means. Iāll just rely on the build system.
This is the part that I still doesnāt understand. Most projects take ~1s to load. But I also encountered some projects that take more than 30s to load, without being able to understand why.
For example Iām testing with this solution: https://github.com/aws/aws-sdk-net/blob/master/sdk/AWSSDK.NetStandard.sln
that contains 289 projects.
all projects but 3 need 1s to load (which is already exceeding the timeout).
test/NetStandard/IntegrationTests/IntegrationTests.NetStandard.csproj needs 34s to load
test/NetStandard/UnitTests/UnitTests.NetStandard.csproj needs 36s to load
test/SmokeTests/AWSSDK.SmokeTests.NetStandard.csproj needs 37s to load
We will continue the investigation and keep you posted.