Error in SonarQube analysis for a .NET project using SonarScanner for .NET 5.12

Must-share information :

  • which versions are you using: SonarQube Community Edition 9.9 LTS, SonarScanner for .NET 5.12
  • how is SonarQube deployed: zip
  • what are you trying to achieve: SonarQube analysis of a .NET application
  • what have you tried so far to achieve this:

I am trying to analyze a .NET framework application using SonarScanner for .NET 5.12 version. The analysis is failing in the 2nd command. The build of the application is failing.
The application builds successfully without the begin stage, but if I add the begin command, the application build fails. What can be he possible solution. Please guide.
The build is failing for 2 cobol files with .cblproj extension. But the build for these 2 .cblproj file do not fail if I do not add the begin step of analysis.

Thanks and Regards
Niccha Das

What error does it fail with?

Hi Colin,

Sorry for taking time to share the error. Attaching a screenshot of the error


.

Please note that the build fails only when I add the begin stage of SonarQube .NET analysis. When I simply do a build of the application without the begin stage of SonarQube, the application builds successfully. We are using SonarQube community Edition 8.9 LTS

This isn’t the first report of failures when using cblproj.

I’ll flag this for attention from the right team.

:warning: Make sure you upgrade to SonarQube v9.9 LTS soon, not only to benefit from our Best LTS Ever™, but because soon we will systematically ask users to upgrade when they ask questions about earlier versions of SonarQube, which are now considered unsupported. :smiley:

Hi Colin, W upgraded to SonarQube 9.9 LTS but facing the same error as mentioned above. Any advice?

Thanks and Regards
Niccha Das

Hey there.

It was just information for you – there’s no fix in SonarQube v9.9 LTS. As mentioned, I’ve flagged this for attention from the right team, to see if this is something on our radar/roadmap (or not).

Thanks Colin :slight_smile: Appreciate your support

@NicchaD try setting the following property in the .cblproj files:

<PropertyGroup>
    <SonarQubeExclude>true</SonarQubeExclude>
</PropertyGroup>

if that doesn’t work, please shared the diagnostic MSBuild logs (created by setting /v:diag on the MSBuild command line).