We have a solution with 5 projects inside.
After running the MSBuild runner, our sonar only contains the analysis of one project instead of the complete solution.
Execution:
cd K:\sonarRoot
D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe begin /k:"solutionKey" /n:"solutionName" /v:"solutionVersion" /d:sonar.resharper.cs.reportPath="K:\<pathToXml>\resharper.xml" /d:sonar.resharper.solutionFile="K:\<pathToSolution>\solution.sln"
C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe K:\<pathToSolution>\solution.sln /t:rebuild /p:Configuration=Release /p:TargetFrameworkVersion="v4.5.2" /verbosity:n /flp1:logfile=D:\ModuleBuild\Workspace\builderrors.txt;errorsonly;append=true
D:\BuildTools\ReSharperCommandLineTools\inspectcode.exe "K:\<pathToSolution>\solution.sln" /o="K:\<pathToXml>\resharper.xml"
D:\BuildTools\MSBSonarQubeRunner-1.0.2\MSBuild.SonarQube.Runner.exe end > D:\ModuleBuild\Workspace\sonar.out 2> D:\ModuleBuild\Workspace\sonar.err
This all runs fine, except that just one solution shows up in Sonar... For every file in the solution that is not in the project, we get a line in the runner output like this:
12:14:43.513 INFO - Skipping the ReSharper issue at line 262 whose file "{pathToSource}\ChangeListHelper.cs" is not in SonarQube.
Somehow the sonar-project.properties that gets generated from the MSBuild runner contains a sonar.projectname of the project and not the solution. And the sonar.projectBasedir is also set to the project.
How are we supposed to fix it, so the complete solution gets analyzed?
.sonarqube\outafter the analysis? There should be one per project, and a.sonarone if you've already executed theendstep. In the generated sonar-project.propeties, look for thesonar.modules=line at the end of the file, what is its value? - Dinesh Bolkensteyn