Scanner analyses PRs but not main branch

  • ALM used - Azure DevOps
  • CI system used - Azure Pipelines
  • Scanner command used when applicable (private details masked):
    Configured by using official guide
- task: SonarCloudPrepare@1
      SonarCloud: 'xxxxx'
      organization: 'xxxxxxx'
      scannerMode: 'MSBuild'
      projectKey: 'xxxxxxxxxxxxx'
      projectName: 'xxxxx'

 - task: VSBuild@1

- task: SonarCloudAnalyze@1

- task: SonarCloudPublish@1
      pollingTimeoutSec: '300'

  • Languages of the repository - C#, JS

  • Project is private. Will share details via private message if required.

  • Error observed -

  • Steps to reproduce - Run Azure Pipeline, get PR analysis but not for main branch.

Hey there.

What is the default branch of your repository in Azure DevOps – and you triggered an analysis of that branch? You should see in the logs at the end of analyses a link to where the results went:

INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at
INFO: Analysis total time: 17.690 s

The default branch in Azure DevOps is develop.
All PRs are merged there.

So the difference with your messages is in the first line. I have a pull request query parameter in the link -

Okay. What about when you run your build on the develop branch? Are the SonarCloud tasks executed?

Hi Colin. After a couple attempts the dashboard for main branch was updated.
The error message was a bit misleading in regards what actions should be taken to resolve it.
Thank you.
Please close this ticket.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.