Analyzing multiple C/C++ projects using build-wrapper and msbuild scanner


(Carl Styan) #1

Hi Team,

Sonarqube 6.7
SonarCFamily 5.1.1

We are setting up our first scan using Developer Edition and the SonarCFamily Scanner. We’d like to scan a large project with ~60% shared c/c++ code which builds a number of products from multiple solution files, and have this all in one SonarQube project.

We have this working in Azure DevOps for a single solution using the build wrapper, however when we attempt to scan multiple solutions only the last scan is analysed. Can the build wrapper be used to combine analysis from multiple solutions?

For example:

  1. Prepare Analysis Configuration:
    (SonarScanner.MSBuild.exe begin)
  1. Build Wrapper (msbuild):
./rootFolder/solution1/build-wrapper-win-x86-64.exe --out-dir bw_output msbuild.exe
./rootFolder/solution2/build-wrapper-win-x86-64.exe --out-dir bw_output msbuild.exe
  1. Run Code Analysis
    (SonarScanner.MSBuild.exe end)

Many thanks,