"No analysable projects were found" in Azure DevOps

I’m using a SonarQube task within a build pipeline with Azure DevOps. The only project being built as part of that pipeline is a .NET Core 3.1 one. The problem is that the SonarQube task always fails with “No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details”.

From what I’ve seen, the usual culprit is the missing project guid within the .csproj file, as reported here, however in this case I made sure to copy the project guid from the solution’s .sln file. Yet the error is still there.

I have other Azure DevOps build pipelines that share the same template as the one described above. A variable within controls the path of the project to be built as part of the solution. For some reason all of the other projects (also .NET Core 3.1) can be analyzed just fine by SonarQube, and it’s only this one project that’s generating the “no analysable projects were found”. I’ve double-checked that the path to the project used for the build is correct.

I’ve also taken the logs from the SonarQube server (log level is set to INFO currently), but couldn’t find anything related to the error.

I’m running SonarQube v4.17.0.

Is there anything else that I should check, or any other place that could yield the cause of the problem?

Hi @mihai.albert and welcome to the community !

Would be great if you could share the logs of
-Prepare analysis configuration, in Debug (system.debug=true)

  • The dotnet / MSBuild log, ideally in verbose mode
  • The Run Code Analysis logs, in debug as well

I can PM you so you can share those privately, just let me know.

Thanks !
Mickaël

Hi Michael,

Sorry for the long delay in replying. It turned out that no unit test was available to run - as soon as one was created, the SonarQube task finished just fine.

It would have helped if the error message was more specific as to pinpoint the source of the problem, particularly since the logs I’ve went through didn’t reveal a lot.

Regards,
Mihai

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.