Run code analysis (.NET) on Azure Devops: Failed to delete temp folder (since today, node upgrade)

Using the Sonarcloud tasks in Azure Devop (- task: SonarCloudAnalyze@1) started failing today for different pipelines.

Sidenote: The Node version was upgraded today on our build agents (since the old version was no longer supported).

The error we get is:

INFO: ANALYSIS SUCCESSFUL, you can find the results at: [[REDACTED]]
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AX-OhdL561HRYm764Utl
##[error]ERROR: Failed to delete temp folder
ERROR: Failed to delete temp folder
##[error]java.nio.file.AccessDeniedException: E:\Agent01\_work\15\.sonarqube\out\.sonar\.sonartmp\4937689014383170660\jni.dll

The analysis is succesful and published to the dashboard. The pipeline succeeds as well. However, we want to get rid of this error entirely because it is worrying + we want the deletion of the temp folder to succeed to avoid running out of disk space (a common problem for us).

Steps tried:

  • rebooting the build agents
  • restarting the devops agent services as “local system”
  • removing the mentioned folders manually.

We keep getting this errors, on different pipelines AND on different build agents.

Hey there.

See this thread here: