Error: main branch of this project is empty

using sonarqube community edition 8.4.1
error: the main branch of the project is empty

2020-10-06T16:48:33.5435618Z ##[section]Starting: Run Code Analysis
2020-10-06T16:48:33.5707192Z ==============================================================================
2020-10-06T16:48:33.5707505Z Task : Run Code Analysis
2020-10-06T16:48:33.5707789Z Description : Run scanner and upload the results to the SonarQube server.
2020-10-06T16:48:33.5708057Z Version : 4.11.0
2020-10-06T16:48:33.5708258Z Author : sonarsource
2020-10-06T16:48:33.5708874Z Help : Version: 4.11.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information
2020-10-06T16:48:33.5709450Z ==============================================================================
2020-10-06T16:48:33.8639705Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\agent_work_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat “–from=ScannerAzureDevOps/4.11.0"”
2020-10-06T16:48:34.0516350Z INFO: Scanner configuration file: C:\agent_work_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin…\conf\
2020-10-06T16:48:34.0527069Z INFO: Project root configuration file: NONE
2020-10-06T16:48:34.0856323Z INFO: SonarScanner
2020-10-06T16:48:34.0857643Z INFO: Java 11.0.1 Oracle Corporation (64-bit)
2020-10-06T16:48:34.0858107Z INFO: Windows Server 2016 10.0 amd64
2020-10-06T16:48:34.4675134Z INFO: User cache: C:\Users\dihcjr.sonar\cache
2020-10-06T16:48:34.5508909Z INFO: Scanner configuration file: C:\agent_work_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin…\conf\
2020-10-06T16:48:34.5509725Z INFO: Project root configuration file: NONE
2020-10-06T16:48:34.5648291Z INFO: Analyzing on SonarQube server 8.4.1
2020-10-06T16:48:34.5649059Z INFO: Default locale: “en_CA”, source code encoding: “windows-1252” (analysis is platform dependent)
2020-10-06T16:48:35.0073135Z INFO: Load global settings
2020-10-06T16:48:35.0847510Z INFO: Load global settings (done) | time=78ms
2020-10-06T16:48:35.0848175Z INFO: Server id: 079D80A9-AXPg_rm-DFJ74a_dbxlq
2020-10-06T16:48:35.0857662Z INFO: User cache: C:\Users\dihcjr.sonar\cache
2020-10-06T16:48:35.0883439Z INFO: Load/download plugins
2020-10-06T16:48:35.0883894Z INFO: Load plugins index
2020-10-06T16:48:35.1490895Z INFO: Load plugins index (done) | time=47ms
2020-10-06T16:48:35.2339270Z INFO: Load/download plugins (done) | time=125ms
2020-10-06T16:48:40.6551813Z INFO: Process project properties
2020-10-06T16:48:40.6563177Z INFO: Process project properties (done) | time=0ms
2020-10-06T16:48:40.6564546Z INFO: Execute project builders
2020-10-06T16:48:40.6611864Z INFO: Execute project builders (done) | time=0ms
2020-10-06T16:48:40.6661772Z INFO: Project key: UserManagementService
2020-10-06T16:48:40.6666977Z INFO: Base dir: C:\agent_work\107\s
2020-10-06T16:48:40.6669920Z INFO: Working dir: C:\agent_work\107\s.scannerwork
2020-10-06T16:48:40.7288509Z INFO: Load project settings for component key: ‘UserManagementService’
2020-10-06T16:48:40.7503305Z INFO: Load project settings for component key: ‘UserManagementService’ (done) | time=16ms
2020-10-06T16:48:40.8616321Z INFO: Load quality profiles
2020-10-06T16:48:40.9222031Z INFO: Load quality profiles (done) | time=63ms
2020-10-06T16:48:40.9257751Z INFO: Auto-configuring with CI ‘Azure DevOps’
2020-10-06T16:48:40.9355750Z INFO: Load active rules
2020-10-06T16:48:41.8406699Z INFO: Load active rules (done) | time=906ms
2020-10-06T16:48:41.8995748Z INFO: Indexing files…
2020-10-06T16:48:41.8996320Z INFO: Project configuration:
2020-10-06T16:48:42.6250527Z INFO: 548 files indexed
2020-10-06T16:48:42.6251167Z INFO: Quality profile for cs: Sonar way
2020-10-06T16:48:42.6251505Z INFO: Quality profile for xml: Sonar way
2020-10-06T16:48:42.6251857Z INFO: ------------- Run sensors on module UserManagementService
2020-10-06T16:48:42.7331193Z INFO: Load metrics repository
2020-10-06T16:48:42.7964237Z INFO: Load metrics repository (done) | time=61ms
2020-10-06T16:48:43.4407948Z WARNING: An illegal reflective access operation has occurred
2020-10-06T16:48:43.4408828Z WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Users/dihcjr/.sonar/cache/52f5340dd05620cd162e2b9a45a57124/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,
2020-10-06T16:48:43.5981563Z WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
2020-10-06T16:48:43.5984046Z WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2020-10-06T16:48:43.6529243Z WARNING: All illegal access operations will be denied in a future release
2020-10-06T16:48:44.4666424Z INFO: Sensor SonarCSS Rules [cssfamily]
2020-10-06T16:48:44.4690872Z INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
2020-10-06T16:48:44.4699939Z INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=0ms
2020-10-06T16:48:44.4745873Z INFO: Sensor JaCoCo XML Report Importer [jacoco]
2020-10-06T16:48:44.4747907Z INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
2020-10-06T16:48:44.4748801Z INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
2020-10-06T16:48:44.4749725Z INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=16ms
2020-10-06T16:48:44.4750306Z INFO: Sensor C# Properties [csharp]
2020-10-06T16:48:44.4750898Z WARN: Property missing: ‘sonar.cs.analyzer.projectOutPaths’. No protobuf files will be loaded for this project.
2020-10-06T16:48:44.4751636Z WARN: No Roslyn issues report found for this project.
2020-10-06T16:48:44.4752144Z INFO: Sensor C# Properties [csharp] (done) | time=0ms
2020-10-06T16:48:44.4752653Z INFO: Sensor JavaXmlSensor [java]
2020-10-06T16:48:44.4753122Z INFO: 1 source files to be analyzed
2020-10-06T16:48:44.4945897Z INFO: Load project repositories
2020-10-06T16:48:44.5881131Z INFO: Load project repositories (done) | time=94ms
2020-10-06T16:48:46.1321029Z INFO: Sensor JavaXmlSensor [java] (done) | time=1859ms
2020-10-06T16:48:46.1334563Z INFO: Sensor HTML [web]
2020-10-06T16:48:46.1335228Z INFO: Sensor HTML [web] (done) | time=0ms
2020-10-06T16:48:46.1335531Z INFO: Sensor XML Sensor [xml]
2020-10-06T16:48:46.1335829Z INFO: 1 source files to be analyzed
2020-10-06T16:48:46.1364984Z INFO: 1/1 source files have been analyzed
2020-10-06T16:48:46.9961262Z INFO: Sensor XML Sensor [xml] (done) | time=862ms
2020-10-06T16:48:46.9961941Z INFO: Sensor C# [csharp]
2020-10-06T16:48:46.9962254Z INFO: Sensor C# [csharp] (done) | time=16ms
2020-10-06T16:48:47.0111579Z INFO: ------------- Run sensors on project
2020-10-06T16:48:47.0113001Z INFO: Sensor Zero Coverage Sensor
2020-10-06T16:48:47.0113543Z INFO: Sensor Zero Coverage Sensor (done) | time=0ms
2020-10-06T16:48:47.0119507Z INFO: SCM Publisher is disabled
2020-10-06T16:48:47.0119937Z INFO: CPD Executor Calculating CPD for 0 files
2020-10-06T16:48:47.0120372Z INFO: CPD Executor CPD calculation finished (done) | time=0ms
2020-10-06T16:48:47.0124815Z INFO: 1/1 source files have been analyzed
2020-10-06T16:48:47.3371021Z INFO: Analysis report generated in 281ms, dir size=239 KB
2020-10-06T16:48:48.2331891Z INFO: Analysis report compressed in 922ms, zip size=78 KB
2020-10-06T16:48:48.2918003Z INFO: Analysis report uploaded in 62ms
2020-10-06T16:48:48.2959646Z INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/sonarqube/dashboard?id=UserManagementService
2020-10-06T16:48:48.2960790Z INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2020-10-06T16:48:48.2961410Z INFO: More about the report processing at http://localhost:9000/sonarqube/api/ce/task?id=AXT-0MKIDtG_KRcUbZmD
2020-10-06T16:48:48.3241622Z INFO: Analysis total time: 12.987 s
2020-10-06T16:48:48.3282082Z INFO: ------------------------------------------------------------------------
2020-10-06T16:48:48.3282605Z INFO: EXECUTION SUCCESS
2020-10-06T16:48:48.3282986Z INFO: ------------------------------------------------------------------------
2020-10-06T16:48:48.3283348Z INFO: Total time: 14.284s
2020-10-06T16:48:48.3815958Z INFO: Final Memory: 7M/27M
2020-10-06T16:48:48.3816657Z INFO: ------------------------------------------------------------------------
2020-10-06T16:48:48.4526759Z ##[section]Finishing: Run Code Analysis

Hi Harshith,

To analyze .NET projects, make sure you are including the “Prepare Analysis Configuration” task in your build definition.

If you have set this up and are still experiencing issues, please post the log from that step as well.


Hello Brain,

Thank you for Responding. yes included “preparing Analysis” as a part of the build jobs
logs doesn’t

say much

Finishing: Prepare analysis on SonarQube