C++ and C# combined SONAR analysis

using the mixed source code files for the SONAR scanning. using following commands:

SonarScanner.MSBuild.exe begin /k:"cs-and-cpp-project-key" /n:"My C# and C++ project" /v:"1.0" /d:sonar.cfamily.build-wrapper-output="build_wrapper_output_directory"
build-wrapper-win-x86-64.exe --out-dir build_wrapper_output_directory MSBuild.exe /t:Rebuild
SonarScanner.MSBuild.exe end

error is:

ERROR: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
  * you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  * you are correctly invoking the scanner with correct configuration
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * you are providing the path to the correct build-wrapper output directory
  * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps
The SonarQube Scanner did not complete successfully
19:32:16.581  Post-processing failed. Exit code: 1

SonarScanner.MSBuild.exe  version

SONAR Server version:


Welcome to the community!

To be clear:

  • your project contains both C# and C++ (yes, I know you put that in your subject. Just to be sure…)
  • the C++ code is referenced by your solution. I believe files that are in the directory but not the sln will be skipped by a C# analysis


Hi Ann,

yes you’re right.!
I am running sonar analysis on C# projects (not on Solution) in which some C++ projects have been referred…so my C# analysis went well but there is issue with the C++ project analysis.