SonarQube 7.7 is not Analyzing .CS files

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Hi,

Installed SonarQube 7.7 community edition, tried building the Java code using jenkins and it is working fine. But the it is not analysing the .Net project especially .CS files.
SonaQube 7.7
sonar-scanner-3.3.0.1492
sonar-scanner-msbuild-4.6.0.1930
Visual studio 2017 is also installed on the server.

Logs:
scanner-3.3.0.1492-windows\bin…\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: C:\Users\rajkumar_m06.sonar\cache
INFO: SonarQube server 7.7.0
INFO: Default locale: “en_US”, source code encoding: “windows-1252” (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=59ms
INFO: Server id: BF41A1F2-AWnT01syEvUXSfg2HUYa
INFO: User cache: C:\Users\rajkumar_m06.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=33ms
INFO: Load/download plugins (done) | time=57ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: PGTR_AirRIPDesignGenerator
INFO: Base dir: C:\Jenkins2\Source\Projec1
INFO: Working dir: C:\Jenkins2\Source\Project1.scannerwork
INFO: Load project settings for component key: ‘Project1’
INFO: Load project settings for component key: ‘Project1’ (done) | time=17ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=63ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=125ms
INFO: Load active rules
INFO: Load active rules (done) | time=1570ms
INFO: Indexing files…
INFO: Project configuration:
INFO: 22 files indexed
INFO: Quality profile for cs: Sonar way
INFO: ------------- Run sensors on module Project1
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=32ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=5ms
INFO: Sensor C# Properties [csharp]
WARN: Property missing: ‘sonar.cs.analyzer.projectOutPaths’. No protobuf files will be loaded for this project.
WARN: No Roslyn issues report found for this project.
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=2ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=14ms
INFO: Sensor C# [csharp]
INFO: Sensor C# [csharp] (done) | time=1ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=3ms
INFO: SCM Publisher is disabled
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 177ms, dir size=240 KB
INFO: Analysis report compressed in 18ms, zip size=34 KB
INFO: Analysis report uploaded in 41ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=Project1
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AWorI3NGrN5Br4FaBeEQ
INFO: Analysis total time: 3.698 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 4.591s
INFO: Final Memory: 20M/314M
INFO: ------------------------------------------------------------------------
Finished: SUCCESS

I am able to Analyse the .CS files using SonarQube 6.7.7

Can you please help me to fix this issue?

Thanks,
Rajkumar M

welcome to the forum, @contactrajkumar

what is the command you are running to analyze the .NET projects?

Have you followed the steps described in Analyzing with SonarQube Scanner for MSBuild ?

Hi Andrei,

Thank you for your reply and sorry for late response. I am using below command the same is working for the sonarQube 6.7.7.
SonarScanner.MSBuild.exe begin /k:“Project1” /d:sonar.verbose=true
“C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe” “D:\Sonar\Source\Proj1.csproj” /t:Rebuild /v:diag
SonarScanner.MSBuild.exe end

I have followed the steps in Analyzing with SonarQube Scanner for MSBuild

apologies for the late reply @contactrajkumar - did you find what the problem was?