# Error: main branch of this project is empty

**URL:** <https://community.sonarsource.com/t/error-main-branch-of-this-project-is-empty/32491>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, scanner\
**Created:** [October 6, 2020, 8:00pm UTC](https://community.sonarsource.com/t/error-main-branch-of-this-project-is-empty/32491 "2020-10-06T20:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hpingili](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@hpingili](https://community.sonarsource.com/u/hpingili)\
**Post date:** [October 6, 2020, 8:00pm UTC](https://community.sonarsource.com/t/error-main-branch-of-this-project-is-empty/32491/1 "2020-10-06T20:00:00Z")

</div>

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

log:  
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](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)  
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\sonar-scanner.properties  
2020-10-06T16:48:34.0527069Z INFO: Project root configuration file: NONE  
2020-10-06T16:48:34.0856323Z INFO: SonarScanner 4.4.0.2170  
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\sonar-scanner.properties  
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,java.security.ProtectionDomain)  
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](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](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

---

<div class="post-metadata">

**Author:** ![bcipollone](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/bcipollone/32/47031_2.png) [@bcipollone](https://community.sonarsource.com/u/bcipollone)\
**Post date:** [October 7, 2020, 4:18pm UTC](https://community.sonarsource.com/t/error-main-branch-of-this-project-is-empty/32491/2 "2020-10-07T16:18:35Z")

</div>

Hi Harshith,

To analyze .NET projects, make sure you are including the [“Prepare Analysis Configuration” task in your build definition](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-azure-devops/#header-3).

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

Brian

---

<div class="post-metadata">

**Author:** ![hpingili](https://avatars.discourse-cdn.com/v4/letter/h/ecae2f/32.png) [@hpingili](https://community.sonarsource.com/u/hpingili)\
**Post date:** [October 7, 2020, 5:27pm UTC](https://community.sonarsource.com/t/error-main-branch-of-this-project-is-empty/32491/3 "2020-10-07T17:27:05Z")

</div>

Hello Brain,

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

 ![sq](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/5/5232231ce0ae8de8b12db98c9b9fcf420c116593.png)

say much  
logs:

SYSTEMVSSCONNECTION exists true  
Finishing: Prepare analysis on SonarQube
