Can we run the sonar analysis task without building project in the azure DevOps pipeline?

We have a pipeline on a .NET project, that will be run with each PR on the main branch, this pipeline will run sonar analysis.
Before running code analysis task, there is a task to build the project, which takes more than 10 min, and this time is too long, that’s mean each pull request needs that time before merging process.
Is there any way to skip the build project task or decrease build time?

You must build the project with a clean build each time, as that is when the Roslyn analyzers run which produce SonarQube issues.

What version of SonarQube are you using? This information is requested in the template post.


I am also facing similar issue, it takes more than 40 min with sonarscan and less than 10 min without Sonarscan

Version: SonarQube community 9.3

could you please suggest Is there a way to reduce build time?

Thank you

Hey all.

First, please make sure you’re using a supported version of SonarQube (v9.9 LTS or v10.0 right now). There have been significant improvements during the 9.x series, including in the realm of performance.

If you still face performance issues, I would suggest referring to this troubleshooting guide: