Timeout when trying to open big solutions with many projects
Description
When trying to analyze a file from a big solution having many projects, the analysis will timeout before the solution is fully loaded, and so no issues are reported.
One quick fix would be to increase the timeout, or make it configurable, but I'm concerned by the user experience, waiting multiple minutes until the first analysis results are appearing.
I discovered the loadProjectsOnDemand feature that has been contributed to OmniSharp in 2018.
When using this flag, OmniSharp will not load projects at startup, but only the first time a file of this project is accessed. The problem is that the logic to find the .csproj a file belongs to is not 100% reliable IMO. Also if a project depends on another project(s) of the solution, there will be possibly missing dependency resolutions, and so less accurate analysis.
It is now possible to define the analysis property sonar.cs.internal.loadProjectsOnDemand=true and this will skip initial loading of the solution. Projects will be loaded one at a time, when analyzing a file they contain. This might lead to less accurate analysis, especially regarding cross file/references analysis.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
When trying to analyze a file from a big solution having many projects, the analysis will timeout before the solution is fully loaded, and so no issues are reported.
This is a well known performance issue on OmniSharp side.
One quick fix would be to increase the timeout, or make it configurable, but I'm concerned by the user experience, waiting multiple minutes until the first analysis results are appearing.
I discovered the loadProjectsOnDemand feature that has been contributed to OmniSharp in 2018.
When using this flag, OmniSharp will not load projects at startup, but only the first time a file of this project is accessed. The problem is that the logic to find the .csproj a file belongs to is not 100% reliable IMO.
Also if a project depends on another project(s) of the solution, there will be possibly missing dependency resolutions, and so less accurate analysis.