I'm trying to integrate the
SonarQube Scanner for MSBuild (2.3) into the build configurations of our Visual Studio Solutions (VS 2015, C#).
Reason: Our CI server is TeamCity from JetBrains which builds Visual Studio Solutions by running msbuild on the solution file.
I have set up a little test project (just a hello world application) and added the begin step as pre-build event and the end step as post-build event.
The begin step runs fine, but the build step doesn't produce any output in .sonarqube and therefore the end step fails ("SonarQube was unable to collect the required information about your projects").
When I run the scanner and msbuild from the command line everything works, but exactly the same configuration fails, when being run inside Visual Studio and even from the command line with msbuild and the solution file.
To trace the issue down I compared the output of the two configurations line by line.
Both configurations run with MSBuild 14, all paths and variables and the complete build process are identical.
The only and crucial difference I could find is that msbuild runs the task CreateProjectSpecificDirs:
"Creating directory "C:\NET\Test\TestApplication\.sonarqube\conf\TestApplication_8337"."
When running the solution this task is not executed,
So the main questions are:
What is the difference concerning the scanner between running msbuild on project files and running msbuild on solution files?
How can I trigger creation of the project specific files for the Sonarqube scanner from a VS solution?