I have a similar issue in which the sonarcloud integration tasks seem to “leak” into other jobs on the same agent. We are using private agents, and every once in a while a job that doesn’t have sonarcloud integration suddenly starts scanning with sonarcloud. So it seems that the sonarcloud integration sometimes isn’t cleaned up properly on an agent.
Is the only way around this to not integrate sonarcloud with msbuild and run it manually? We cannot end up in a situation where “sometimes” random builds fail because of unwanted sonarcloud integration.
Let me stress we are NOT running parallel jobs on the same agent machine, so it really seems to be a cleanup issue