Sonarqube could not able to scan C# Code, getting lines of code blank

------------- Scan ICCC_Automation
15:09:42 INFO: Initializer GenericCoverageSensor
15:09:42 INFO: Initializer GenericCoverageSensor (done) | time=0ms
15:09:42 INFO: Base dir: D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation
15:09:42 INFO: Working dir: D:\jenkins\workspace\ICCC_Automation_Sonar.sonarqube\out.sonar
15:09:42 INFO: Source encoding: windows-1252, default locale: en_US
15:09:42 INFO: Index files
15:09:42 INFO: 0 files indexed
15:09:42 INFO: Sensor Embedded CSS Analyzer Sensor [css]
15:09:42 INFO: 0 source files to be analyzed
15:09:42 INFO: Sensor Embedded CSS Analyzer Sensor [css] (done) | time=2ms
15:09:42 INFO: Sensor SonarJavaXmlFileSensor [java]
15:09:42 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
15:09:42 INFO: 0/0 source files have been analyzed
15:09:42 INFO: Sensor Analyzer for “php.ini” files [php]
15:09:42 INFO: Sensor Analyzer for “php.ini” files [php] (done) | time=0ms
15:09:42 INFO: Sensor C# Tests Coverage Report Import [csharp]
15:09:42 INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=0ms
15:09:42 INFO: Sensor [Deprecated] C# Integration Tests Coverage Report Import [csharp]
15:09:42 INFO: Sensor [Deprecated] C# Integration Tests Coverage Report Import [csharp] (done) | time=1ms
15:09:42 INFO: Sensor C# Unit Test Results Import [csharp]
15:09:42 INFO: Sensor C# Unit Test Results Import [csharp] (done) | time=0ms
15:09:42 INFO: Sensor Zero Coverage Sensor
15:09:42 INFO: Sensor Zero Coverage Sensor (done) | time=0ms
15:09:42 INFO: Sensor CPD Block Indexer
15:09:42 INFO: Sensor CPD Block Indexer (done) | time=0ms
15:09:42 INFO: Calculating CPD for 0 files
15:09:42 INFO: CPD calculation finished

Hi.

Are you using the SonarQube Scanner for MSBuild?

Colin

Yes, we are using MS Build for sonar qub

Thanks,

Venkat

I think for anybody to be able to help you, please provide at least full analysis logs, if not full build logs.

Colin

16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\bin\Release\RazorEngine.xml’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\bin\Release\WebDriver.xml’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\bin\Release\WebDriver.Support.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\bin\Release\WebDriver.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\ICCCAutomation.csproj’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\IEDriverServer.exe’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\extent-config.xml’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\license’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\ICCCAutomation.csproj.FileListAbsolute.txt’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\ICCCAutomation.csprojResolveAssemblyReference.cache’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\ICCCAutomation.pdb’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\chromedriver.exe’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\TempPE\BDD.Feature.Alarm.feature.cs.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\ICCCAutomation.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\TempPE\BDD.Feature.Census.feature.cs.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\TempPE\BDD.Feature.eTask.feature.cs.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\TempPE\BDD.Feature.Login.feature.cs.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Release\ICCCAutomation.csproj.FileListAbsolute.txt’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\TempPE\BDD.Feature.PatientProfile.feature.cs.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Release\ICCCAutomation.csprojResolveAssemblyReference.cache’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Release\ICCCAutomation.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Debug\TempPE\BDD.Feature.eAssist.feature.cs.dll’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\packages.config’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 WARNING: WARN: File ‘D:\jenkins\workspace\ICCC_Automation_Sonar\ICCCAutomationB02\ICCCAutomation\obj\Release\ICCCAutomation.pdb’ is ignored because it doesn’t belong to the forced language ‘cs’
16:01:28 INFO: 26 files indexed
16:01:28 INFO: Quality profile for cs: Sonar way
16:01:28 INFO: Sensor Embedded CSS Analyzer Sensor [css]
16:01:28 INFO: 0 source files to be analyzed
16:01:28 INFO: Sensor Embedded CSS Analyzer Sensor [css] (done) | time=2ms
16:01:28 INFO: Sensor C# [csharp]
16:01:28 INFO: 0/0 source files have been analyzed
16:01:28 INFO: Importing analysis results from D:\jenkins\workspace\ICCC_Automation_Sonar\null\output-cs
16:01:28 WARNING: WARN: Protobuf file not found: null\output-cs\encoding.pb
16:01:28 WARNING: WARN: Protobuf file not found: null\output-cs\metrics.pb
16:01:28 WARNING: WARN: Protobuf file not found: null\output-cs\issues.pb
16:01:28 WARNING: WARN: Protobuf file not found: null\output-cs\token-type.pb
16:01:28 WARNING: WARN: Protobuf file not found: null\output-cs\symrefs.pb
16:01:28 WARNING: WARN: Protobuf file not found: null\output-cs\token-cpd.pb
16:01:28 INFO: Sensor C# [csharp] (done) | time=26ms
16:01:28 INFO: Sensor SonarJavaXmlFileSensor [java]
16:01:28 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
16:01:28 INFO: Sensor Analyzer for “php.ini” files [php]
16:01:28 INFO: Sensor Analyzer for “php.ini” files [php] (done) | time=0ms
16:01:28 INFO: Sensor C# Tests Coverage Report Import [csharp]
16:01:28 INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=0ms
16:01:28 INFO: Sensor [Deprecated] C# Integration Tests Coverage Report Import [csharp]
16:01:28 INFO: Sensor [Deprecated] C# Integration Tests Coverage Report Import [csharp] (done) | time=0ms
16:01:28 INFO: Sensor C# Unit Test Results Import [csharp]
16:01:28 INFO: Sensor C# Unit Test Results Import [csharp] (done) | time=0ms
16:01:28 INFO: Sensor Zero Coverage Sensor
16:01:28 INFO: Sensor Zero Coverage Sensor (done) | time=12ms
16:01:28 INFO: Sensor CPD Block Indexer
16:01:28 INFO: Sensor CPD Block Indexer (done) | time=0ms
16:01:28 INFO: Calculating CPD for 0 files
16:01:28 INFO: CPD calculation finished
16:01:28 INFO: Analysis report generated in 418ms, dir size=1 MB
16:01:29 INFO: Analysis reports compressed in 522ms, zip size=133 KB
16:01:29 INFO: Analysis report uploaded in 50ms
16:01:29 INFO: ANALYSIS SUCCESSFUL, you can browse http://ingbtcpic5dtn82:9000/dashboard/index/ICCCAutomation
16:01:29 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
16:01:29 INFO: More about the report processing at http://ingbtcpic5dtn82:9000/api/ce/task?id=AWd4xdJaEXYDOhpZ2hsS
16:01:29 INFO: Executing post-job org.sonar.plugins.buildbreaker.QualityGateBreaker
16:01:29 INFO: Waiting for report processing to complete…
16:01:39 INFO: Quality gate status: NONE
16:01:39 INFO: Task total time: 14.214 s
16:01:39 INFO: ------------------------------------------------------------------------
16:01:39 INFO: EXECUTION SUCCESS
16:01:39 INFO: ------------------------------------------------------------------------
16:01:39 INFO: Total time: 15.694s
16:01:39 INFO: Final Memory: 52M/469M
16:01:39 INFO: ------------------------------------------------------------------------
16:01:39 The SonarQube Scanner has finished
16:01:39 16:01:39.797 Creating a summary markdown file…
16:01:39 16:01:39.799 Analysis results: http://ingbtcpic5dtn82:9000/dashboard/index/ICCCAutomation
16:01:39 16:01:39.799 Post-processing succeeded.
16:01:39 Set build name.
16:01:39 Unrecognized macro ‘TFS_CHANGESET’ in ‘#33_${TFS_CHANGESET}’
16:01:40 [PostBuildScript] - Execution post build scripts.
16:01:40 Extended Email Publisher is currently disabled in project settings
16:01:40 Finished: SUCCESS