SonarQube was unable to collect the required information about your projects. -Outsell

Template for a good new topic, formatted with Markdown:

  • ALM used Azure DevOps
  • CI system used Azure DevOps
  • Languages of the repository C#
  • Error observed See below
  • Steps to reproduce - intermittent kick off build in Azure DevOps Build Pipeline
  • Potential workaround - kick off Azure DevOps Build Pipeline again and hope that communication between AWS ans SonarCloud is working.

We have an Azure DevOps build pipeline that runs fine most of the time, but we are seeing more and more errors like the following. Usually restarting the same build pipeline with NO changes will create a successful build (including the analysis step). Can you provide more details on what is causing the error? Is this a communication problem between our private build server and SonarCloud.io? (Note our build server is a hosted instance in AWS)

We’ve reviewed the possible causes and none of them are applicable.

  1. Project has previously been built - we are building the Visual Studio solution (sln file)
  2. Using MSBuild that ships with the Visual Studio 2017 build tools
  3. Begin, build, and end steps are all in the same folder
  4. All projects have a unique GUID

We’ve also checked similar topics.

Re-running without making any changes proves successful.

##[error]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.25420.1 and higher 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)
    The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
    Possible causes:
  5. The project has not been built - the project must be built in between the begin and end steps
  6. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
  7. The begin, build and end steps have not all been launched from the same folder
  8. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
    Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
    ##[error]09:41:20.899 Post-processing failed. Exit code: 1
    09:41:20.899 Post-processing failed. Exit code: 1
    ##[error]The process ‘H:\Agents\DEP-2_work_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1

Hi @W0GER,

What do you mean by same folder ? Are they running in the same build instance at least ?

If possible, could you please share the Run Code analysis task in debug mode please ?

Thanks.
Mickaël

Michael, the build process and tasks do no change the working directory. The begin, build, and end steps are part of the same Build Pipeline definition.

We’ve enabled debug, but we haven’t seen it fail since doing so.