Currently using Developer Edition v7.3, all latest plug-ins, including SonarCFamily v5.1.1 and TFVC 2.1.2. Our TFS 2017 server has the v4 extension installed.
Previously on Community Edition, scanning our primarily C# solutions. But some of them have C++ projects that we’d like to now include in the scans. Hence upgrading to Developer. But we’re having a heck of a time correlating the various snippets from the Wiki on how to get this working properly.
A typical TFS build definition will have the Prepare task, a Build task, a Test task, a Run Code Analysis task, then the Publish task. For a C#-only solution, this works.
When we now have a solution with C++ projects, the first error we got is about sonar.cfamily.build-wrapper-output not being set. So, fine, in the Prepare task we add
Now we’re past that error, except no build-wrapper-dump.json is ever created, nor any build*.log files.
The documentation (https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Extension+for+VSTS-TFS) specifically says “The extension allows the analysis of all languages supported by SonarQube”.
One of our guys playing with this managed to make one test definition work by having: Prepare Analysis, MSBuild.Begin task, a Build-Wrapper task, a Test task, an MSBuild.End task, Analysis task, then the Publish task. It appears to kinda work, but I refuse to believe that we need to go through all this pain for every solution in every build definition. There must be some subtle step/setting we’re missing.