MSBuild tasks running into a timeout with sonarqube extension

SonarQube Version: 7.9.1
SonarQube Extension Version: 4.8.0

When running a msbuild pipeline for a .net project containing sonarqube tasks, the pipeline permanently runs into a timeout, while other .net pipelines without the sonarqube taks are working fine.

6_Projektmappe Servicecenter.sln erstellen.txt (64.2 KB)


Are you using a Microsoft-hosted or a self-hosted agent ?


Our build environment is completely on-premise. So, yes we’re using a self-hosted agent.

This is the log of a failed build pipeline. Maybe it helps to resolve this issue.

Worker_20191009-135930-utc.log.txt (105.7 KB)

Hi @flyerwire

Is that possible for you to provide us the MSBuild log with either the binary log (and send us the *.binlog file that has been produced) with

msbuild.exe /bl

included or a diagnostic one ?

msbuild.exe -verbosity:diag

And, are you building a “DAL” project with some Entity migration inside ?
If yes, you might face this current issue :

Thank you.


And, are you building a “DAL” project with some Entity migration inside ?
If yes, you might face this current issue :

Yes, there is a legacy “DAL” project which is build with EntitySpaces inside my solution. I’ll try the workaround from the issue after creating the requested binary log.

Excluding the “DAL” project did the trick. Now all builds are doing fine.

But it seems that something went wrong in the case of a timedout build because building projects without the “DAL” project failed to build too.

1 Like

You mean that you have two msbuild tasks in your build pipeline, and then if the first one fail, the other one as well ?

Yes, but this affected every build-pipeline with sonar-qube tasks which got build on the same build machine. Regardles if its the same project or not.

So to me it looks like some kind of memory leak or something else.

Do you have the “Build in parallel” option checked in the Visual Studio build task ? If yes, can you try again without this option ?

No, its disabled for all build pipelines.

this a common issue, with Sonarqube and Build agents. For my team, we invested on a build server and built Build Agents as services, sorted the whole issue, the build agents are dedicated and not shared along apps, hosted agents are usually being shared, thats abad idea especially if you have CI/CD pipelines and Sonarqube scans