Must-share information :
- which versions are you using SonarQube : Community Edition - Version 9.9 (build 65466)
- how is SonarQube deployed: zip
- what are you trying to achieve: I am trying to analyze my project with sonarqube but I am experiencing problems with c# files.
- What have you tried so far to achieve this result?
Sonarqube is installed on a remote machine and via gitlab jobs we launch sonarqube.
The commands used are as follows:
SonarScanner.MSBuild.exe begin /k: “key” /d:sonar.login=“token”
SonarScanner.MSBuild.exe end /d:sonar.login=“token”
Some useful info about the project:
The project is a web application that was built in .net Core 1.0 (if I remember correctly) with the project files being in an ‘.xproj’ version and the dlls being in .net framework 4.6.1 instead.
Moving from visual studio 2015 to 2019 (and now to 2022) since the .xproj files were no longer supported they were migrated to .csproj.
Now all elements in the solution have 4.6.1 as the target framework.
(I think because of this there is another problem and the files that were .net Core are not parsed with msbuild and we need the dotnet command)
Now we come to the main problem, after launching the Job the project is created on sonarqube but the c# files are not parsed (only the .xml ones). Going to the sonarqube page the c# classes are present but not parsed.
Looking at the scan result I find this information:
INFO: Sensor C# [csharp].
WARN: No protobuf reports found. The C# files will not have highlighting and metrics. You can get help on the community forum: https://community.sonarsource.com
I attach logs:
SonarResult.zip (332.6 KB)
Thank you very much!