Run SonarQube Analysis Error

Hi Team,

In IdMapperService build pipeline, when tried to queue .net 8 project, the pipeline failed in the step “Run SonarQube Analysis” with the error - "##[error][SQ] The ‘Prepare Analysis Configuration’ task was not executed prior to this task
"
Kindly help to resolve this build “Run SonarQube Analysis” step failure for us to proceed further.

Thanks!

Hey there.

How is your build configured? Can you share the pipeline config here? What version of SonarQube are you using?

Hi Colin,

Please find the below details:

How is your build configured? Please refer dotnet-build

Pipeline Config : Please refer application-IdMapperService
dotnet-build.txt (13.3 KB)
application-IdMapperService.txt (784 Bytes)

SonarQube Developer Edition - Version 9.9.3

Thanks!

Well, it seems like SonarQube analysis is disabled.

  - ${{ if eq(parameters.netPlatform, '.NET Framework') }}:
    # - script: echo Note that SonarQube prepare is temporarily disabled.
    #   displayName: Notice About SonarQube Being Disabled

    - task: SonarQubePrepare@4
      displayName: 'Prepare SonarQube Analysis'
      inputs:
        SonarQube: 'SonarQube'
        scannerMode: 'MSBuild'
        projectKey: '$(Build.definitionName)'
        projectName: '$(Build.definitionName)'
        projectVersion: '$(Build.BuildID)'
        extraProperties: |
          sonar.c.file.suffixes=-
          sonar.cpp.file.suffixes=-
          sonar.objc.file.suffixes=-

So you’ll probably want to talk to the maintainer of this build pipeline to understand why.