SonarQube 9.3.0.51899, SonarScanner for Azure DevOps 5.4.0

Trying to Scan .NET 6 projects in Azure Pipelines

Here is my SonarQubePrepare step:

- task: SonarQubePrepare@5
      inputs:
        SonarQube: 'Pipeline Sonarqube Connection'
        scannerMode: 'MSBuild'
        projectKey: 'xxxxxxxxxxxxxxxx'
        projectName: 'xxxxxxxxxxxxxxx'

When building with no SonarQube steps, the build succeeds without issue. When building with a SonarQube Prepare step, the build fails with an error regarding namespace issues for things that are definitely present (again, the exact same code builds without the SQ steps). Projects written in .NET Framework have not had this issue.

When running in diagnostic mode, I noticed that the SonarQubePrepare step is using the classic-sonar-scanner-msbuild and not the dotnet-sonar-scanner-msbuild from the hosted build agent’s tasks folder. I’m not sure if this is the cause, but it seems likely and I cannot find a way to force it to use one scanner over the other.

Can someone please shed some light on this?

0

There are 0 answers