The SonarQube MSBuild integration failed ERROR

Hello, there is an error that I get from time to time, then I run the Build again and it works correctly. This error I have noticed when I run as 3 to more builds (Azure Devops), and all 3 use SonarCloud to analyze, any ideas?

Hi @MartinMaldonado,

If the build is passing on re-run without any other changes then that suggests an issue with the environment.

The two possible causes that come to mind are:

  • there are multiple agents, not all of which are not all configured the same (e.g. some agents have older version of MSBuild on them), or
  • multiple analysis build jobs are running concurrently on the machine, and they are interfering with each other.

A few questions:

  • are you using self-hosted build agents? (it looks from the screen shot that you are).
  • if you have multiple agents, does the build only fail on specific agents?
  • are you running multiple build agents on the same machine?
1 Like

Hi Duncan, thanks for the repply

  • there are multiple agents, not all of which are not all configured the same (e.g. some agents have older version of MSBuild on them), or

Yes, we have multiple agents, they all have the same version of the msbuild, I configured them all recently, but I will confirm it in a moment

multiple analysis build jobs are running concurrently on the machine, and they are interfering with each other.

Yes, it is what I think is happening, on one machine I have 5 agents and the other 5 on another server, and then when I run it does its task on any of the 10 agents, and this case has happened to me when I did 2 or 3 simultaneously builds, sometimes, and other times everything is fine

A few questions:

  • are you using self-hosted build agents? (it looks from the screen shot that you are).
    Yes, we have 5 on server A and the other 5 on server B.
  • if you have multiple agents, does the build only fail on specific agents?
    Good question, I have not noticed that, I will review the historical
  • are you running multiple build agents on the same machine?
    Yes, 5 for each machine

Hi Martin.

If you’re running multiple build agents on the same server you might be affected by issue S4MSB-#843.