Azure DevOps - Run Code Analysis Error


(Deven Patel) #1

We have an Angular app and we are trying to use SonarCloud for code analysis but our Azure Pipeline fails on “Code Analysis”

Below is the log:
The SonarQube 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 steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 and 15.0 are supported
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
    14:03:56.098 Post-processing failed. Exit code: 1
    D:\a_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.6.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe failed with return code: 1

(Colin Mueller) #2

Hi,

When you are “Building Angular” does that actually involve MSBuild at all? If not, you should use the standalone scanner in the “Prepare Analysis” step

Best regards,

Colin


(Deven Patel) #3

Thank you Colin! That did fix it.