No analysable projects were found - Azure DevOps/Self hosted agent


(Senthilnathan Ramadoss) #1

I created a Azure DevOps Build pipeline for a .NET Core solution and tried to configure the SonarQube in the build but endup with errors. I followed the steps from the link -

WARNING: File ‘C:***\DocumentDBRepository.CS’ is not located under the root directory ‘C:\VSTSAgent_work\1\s’ and will not be analyzed.
No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details.

In the Prepare analysis on SonarQube task - I choose the “Integrate with MSBuild” option.

The path it was referring to execute was the c:\VSTSTask_work\1\s. But the sourcecode was in a different location - C:\MaaS

So I added the Advanced -> additional properties section, I added the below


After adding the changes I see the same error.

Later, I also choose the Use standalone scanner and choose - “Store configuration with my source code” and included the file in the root location of the solution.
I used the link -

15:18:22.955 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(
at org.picocontainer.DefaultPicoContainer.getComponent(
at org.sonar.core.platform.ComponentContainer.getComponentByType(
at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(

I also tried “manually provide configuration” option, but I end up with the same error.

Version details

Azure DevOps
SonarQube - Onpremises v 6.7.1
Self hosted agent - Windows 2016
dotnet-sonarscanner v 4.5.0


12.txt (53.9 KB)
123.txt (305.0 KB)