Hi, you’ll need a SQ project for each technology stack.
If the C++ and C# files are all referenced inside the MSBuild projects, they can be analyzed with the Scanner for MSBuild (see Solution with a Mix of C# and C++) and can be the same project in SQ.
As with the above prepare task the libraries where not recogniced, I modified it. Now I get errors regarding the path, see InvalidPathException for sonar.java.libraries. I split it, as it has nothing to do with multi-language projects.
This thread was mentioned elsewhere recently, so I want to follow up. It is possible to analyze C# & other languages at once. It’s just maybe not intuitive.
First you have to make sure the Scanner for .NET recognizes all the files as belonging to the project, so list the extensions in a .csproj file like so:
Then make sure your Java & C++ builds run early in your job and pass forward the relevant properties on the command line. Here’s a sanitized excerpt from where I had to do this many moons ago:
SonarQube.Scanner.MSBuild.exe begin /k:project-key /n:"project name" /d:sonar.cfamily.build-wrapper-output=build /d:sonar.java.binaries=build/classes /d:sonar.host.url=%SONARQUBE_URL% /d:sonar.login=%SONARQUBE_TOKEN%