SonarQube for Visual Studio plugin version: 9.7.0.16245
Programming language you’re coding in: C++
Is connected mode used: No
SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?):
Sonarqube seems to “break” on certain projects i have.
It does nothing in those, no files are analyzed.
Meanwhile it does work in other projects.
I looked at the logs of both and i noticed that in the project that does not work, Sonarqube seems to have detected the wrong “Root=” directory.
[SLCore > Configuration Scope] Updated files system parameters for Configuration Scope MyProject: Root=P:, Commands Directory=
← Here it detects P: where the build-files are, but it should be I: where the source-files are. It detects this properly in other projects.
It then skips all source files because it can’t relativize the file towards that Root.
In the project that works, it sets the “Root=” correctly.
Both projects are Out of Source builds using CMake.
The build directories where the CMake creates all the build-files including the Visual Studio SLN, are on a different drive than the source-files.
In the project that doesn’t work, SonarQube for some reason uses the drive of the build-files as the “Root=”. In the working projects, it uses the drive of the source-files as the “Root=”
Hello everyone!
I have the same issue after upgrading from v.9.6. Versions from 9.0 to 9.6 works fine, but v.9.7.0, v.9.8.0 and v.9.8.1 do not start analysis of the code. The Root is set to c:\ while project is on drive g:\
Hi. Is the project split across multiple drives? I think we might have a bug where we incorrectly assume the root based on the first file path we encounter (which can be random). Is your sln file on the same disk as the source files you’re trying to analyze?
My project is fully located on drive G: including .sln and .vcxproj files.
I’m using Visual Studio 2026 and it is installed on drive C: (cl.exe and settings are stored on drive C:)
Georgii Borovinskikh, thanks, in works for me!
Now SonarQube analyzes files in my project, but there are still similar log entries about system headers (like `File ‘C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\memory.h’ can’t be relativized against root ‘G:\’ and is skipped`)
Normally those library files should be ignored anyway, as we don’t want to analyze them, but the problem is we don’t have a good way to distinguish user vs library files in VS SDK
I was wondering if there is maybe a way to set the SonarQube Root Drive via the settings.json or some similar mechanism, without having to list all the files that should be analyzed there.