SonarQube Server Version - 8.9.10
SonarScanner Version - 4.8.0
Dotnet Core - 3.1
Hello, I’ve been trying to execute a dotnet build with SonarQube analysis. Running dotnet build/publish takes 40 seconds to a minute at most to complete. But when running Sonar Prepare before the build, it now takes 28 mins to complete.
I am running the pipeline via Azure DevOps. We have a previous setup in TeamCity and running SonarQube analysis against Dotnet sources did not take this long to complete.
Any possible workaround for this? I’ve posted the log with -p:ReportAnalyzer=true -verbosity:detailed enabled
Thank you in advance!
Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:
If you have questions about upgrading, feel free to open a new thread for that here.
Regarding your question, for .NET, analysis takes place during the build. Per the docs
The rules configured in your SonarQube Quality Profile are run during the build, and it is expected that analyzing with SonarQube can increase build duration from 4 to 8 times. The impact on duration will vary by project and by what rules are enabled; some rules are simple to execute and others take additional time to have the impact and precision expected of them.
Once you’re on an active version, if performance is still a problem, we can explore that.