I'm running a deployment on Azure pipelines and the release got stuck while copying files. This resulted in an unending process which is not desirable.
The error I received was:
ERROR 32 (0x00000020) Copying File C:\azagent\A2_work\r3\a_mach1-light\build\MyProject\HtmlRenderer.dll The process cannot access the file because it is being used by another process.
I think this issue is not a permanent one since I've been able to successfully run the same release pipeline several times in the past but I want to figure out why it happens.
I've read several docs relating to Azure pipelines and troubleshooting on microsoft's website but none has been useful.
I've also tried to rerun the build pipeline so it could create another release but the issue still persists.
I'd be happy to get advice from anyone who has experienced this before.
Thanks
You can try restarting the "Azure Pipelines Agent (MyCompanyName.MyMachineName)" service on the machine which hosts your deployment agent. See below screenshot.
For more Troubleshooting steps:
You can use tools like Process Monitor and Process Explorer to find out what process is using this specific file. See this thread.
Anti-virus software scanning your files can cause file or folder in use errors during a build or release. Adding an anti-virus exclusion for your agent directory and configured "work folder" may help to identify anti-virus software as the interfering process.
If you use Msbuild in your pipeline:
MSBuild and /nodeReuse:false
MSBuild and /maxcpucount:[n]
Check this document for more information above troubleshooting steps.
User contributions licensed under CC BY-SA 3.0