.NET Core analysis fails in Azure DevOps

We followed https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-msbuild/ to setup SonarCloud integration with our .NET Core 3.1 app using Azure DevOps. We are getting the following errors:

2020-09-25T20:44:12.3944847Z INFO: EXECUTION FAILURE
2020-09-25T20:44:12.3945303Z INFO: ------------------------------------------------------------------------
2020-09-25T20:44:12.3945723Z INFO: Total time: 48.088s
2020-09-25T20:44:12.4400716Z INFO: Final Memory: 6M/27M
2020-09-25T20:44:12.4401911Z INFO: ------------------------------------------------------------------------
2020-09-25T20:44:12.4420985Z ##[error]ERROR: Error during SonarScanner execution
2020-09-25T20:44:12.4423362Z ERROR: Error during SonarScanner execution
2020-09-25T20:44:12.4424642Z ##[error]ERROR: Could not find a default branch to fall back on.
ERROR:
2020-09-25T20:44:12.4426369Z ERROR: Could not find a default branch to fall back on.
2020-09-25T20:44:12.4426979Z ERROR:
2020-09-25T20:44:12.5402025Z ##[error]The SonarQube Scanner did not complete successfully
2020-09-25T20:44:12.5409786Z The SonarQube Scanner did not complete successfully
2020-09-25T20:44:12.5471491Z ##[error]20:44:12.545 Post-processing failed. Exit code: 1
2020-09-25T20:44:12.5473994Z 20:44:12.545 Post-processing failed. Exit code: 1

Any pointers on how to resolve this would be appreciated.

Did you analyse your default (master/main) branch before doing a pull request analysis?

1 Like

4 posts were split to a new topic: .NET analysis during msbuild increased from 15 min to 40+ min