Must-share information (formatted with Markdown):
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!:
Error :
##[error]One or more errors occurred. (One or more errors occurred. (Access to the path ‘d:\Agent_work\864.sonarqube\bin\Newtonsoft.Json.dll’ is denied.)) (One or more errors occurred. (Access to the path ‘d:\Agent_work\864.sonarqube\bin\SonarScanner.MSBuild.Common.dll’ is denied.)) (One or more errors occurred. (Access to the path ‘d:\Agent_work\864.sonarqube\bin\SonarScanner.MSBuild.Tasks.dll’ is denied.)) (Access to the path ‘d:\Agent_work\864.sonarqube\bin\Newtonsoft.Json.dll’ is denied.) (Access to the path ‘d:\Agent_work\864.sonarqube\bin\SonarScanner.MSBuild.Common.dll’ is denied.) (Access to the path ‘d:\Agent_work\864.sonarqube\bin\SonarScanner.MSBuild.Tasks.dll’ is denied.)
Manually kill running instance of dotnet.exe or wait like 20 minutes until the dotnet.exe processes terminate, may allwoing to run pipeline but after some time again the same issue. Our Dev frusted and wanted to remove the SonarQube tasks form the PR pipelines.
The Main issue here is, there is no option of Continue on error for the task as Azure devops Build initialize job itself is failing with this locked files issue.
I have upgraded the SonarQube from 9.7 to 9.9 but the same issue. Could you please check this and advise the correct solution ?
Full logs :
2023-03-02T23:26:01.5980343Z ##[section]Starting: Initialize job
2023-03-02T23:26:01.5982572Z Agent name: 'Agent-BOFI-BUILD1'
2023-03-02T23:26:01.5983144Z Agent machine name: 'BOFI-BUILD1'
2023-03-02T23:26:01.5983437Z Current agent version: '2.214.1'
2023-03-02T23:26:01.6017083Z Agent running as: 'deployuser'
2023-03-02T23:26:01.6076548Z Prepare build directory.
2023-03-02T23:26:01.6998533Z ##[error]One or more errors occurred. (One or more errors occurred. (Access to the path 'd:\Agent\_work\864\.sonarqube\bin\Newtonsoft.Json.dll' is denied.)) (One or more errors occurred. (Access to the path 'd:\Agent\_work\864\.sonarqube\bin\SonarScanner.MSBuild.Common.dll' is denied.)) (One or more errors occurred. (Access to the path 'd:\Agent\_work\864\.sonarqube\bin\SonarScanner.MSBuild.Tasks.dll' is denied.)) (Access to the path 'd:\Agent\_work\864\.sonarqube\bin\Newtonsoft.Json.dll' is denied.) (Access to the path 'd:\Agent\_work\864\.sonarqube\bin\SonarScanner.MSBuild.Common.dll' is denied.) (Access to the path 'd:\Agent\_work\864\.sonarqube\bin\SonarScanner.MSBuild.Tasks.dll' is denied.)
2023-03-02T23:26:01.7018479Z ##[section]Finishing: Initialize job
Did someone get a chance to check this please?
Any hep should be appreciated. At present, i am using,dotnet build with argument /nodeReuse:false. With this workaround, i am not getting the issue but not sure, this is correct solution or not as i observed unit test failures frequently after this work around
Hello @Sridevimondrati
Sorry for the late reply.
Yes the flag you use is the way to go if you are reusing the agent for consequent builds.
Hope that helps.
Mickaël