C++ and C# combined analysis

I’m trying to analyse a C++ and C# solution. The entire solution builds fine in MS Build - and SonarQube can analyse the C# elements ok (using the default steps given when setting up the project in the Web UI).

Following the instructions in the C++/C# mix section of https://docs.sonarqube.org/latest/analysis/languages/cfamily/ - the following three commands:

SonarScanner.MSBuild.exe begin /k:"{key}" /n:"{name}" /v:"{version}" /d:sonar.cfamily.build-wrapper-output="{directory}" /d:sonar.login="{login}"

build-wrapper-win-x86-64.exe --out-dir {directory} MSBuild.exe /t:Rebuild

SonarScanner.MSBuild.exe end /d:sonar.login="{login}

Results in the following output:

ERROR: Error during SonarQube Scanner execution
INFO: ------------------------------------------------------------------------
java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty. Please make sure that:

  • you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  • your compiler is supported
  • you are wrapping your build correctly
  • you are wrapping a full/clean build
  • if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process
    at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:348)

    The SonarQube Scanner did not complete successfully
    14:50:17.848 Post-processing failed. Exit code: 1

Using SonarQube 8.2, MSBuild.SonarQube 4.7.1, C++ build wrapper. As far as I know I am using the latest versions available.

Any support would be appreciated. Thanks!

Hello @matt,

Can you share the build-wrapper-dump.json and build-wrapper.log files? Let me know if you prefer to share them privately.


How can I share these with you privately?

1 Like

@matt I sent you a private message

As discussed with @matt, the issue is fixed. the problem was that the command given to build-wrapper wasn’t building C++ files.

This is to inform you That, We have configured sonarqube in our Prospecta domain and also configured signal sign-on on the sonar server. But we test the account log in With SSO User When it gives authentication error.
Please provide a solution asap. And also find the below error.

Hello @tadmeer,

Please don’t cross-post. Create a new post describing the issue that you are facing.