I am just curious to know why should we have to build (MSBuild) the project first before executing the SonarQube code analysis in Azure DevOps? If we don't build the project first, it is throwing an error like
Post-processing started.
##[error]11:17:23.752 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
1. The project has not been built - the project must be built in between the begin and end ste
Is this mandatory to integrate the SQ? Is there a way to bypass this, I mean I just wanted to run the Code Analysis.
In addition to the points made by David M. Karr, in the specific case of the C# and VB.NET the Sonar analysis rules are implemented as Roslyn analyzers, which means they are executed by the compiler as part of the build. No build, no analysis.
SonarCloud has a feature called AutoScan which provides build-free analysis for some languages, but not currently for C#.