I have been using the Git deployment in Azure with some success but today I am getting an odd error message that is pointing to my New Relic extension being busy.
KuduSync.NET from: 'C:\DWASFiles\Sites\mySite\Temp\c974b345-d98d-4fa4-967a-24c5d3318f63' to: 'D:\home\site\wwwroot'
Error: The process cannot access the file 'D:\home\site\wwwroot\newrelic\NewRelic.Agent.Core.dll' because it is being used by another process.
Copying file: 'Web.config'
Copying file: 'newrelic\NewRelic.Agent.Core.dll'
Failed exitCode=1, command="kudusync" -v 50 -f "C:\DWASFiles\Sites\mySite\Temp\c974b345-d98d-4fa4-967a-24c5d3318f63" -t "D:\home\site\wwwroot" -n
"D:\home\site\deployments\b0cafe3c6458e4bd3b597f91c7dbada951e87ef8\manifest" -p
"D:\home\site\deployments\fe17821502ade78d0242c1992ea0841e48e2dce4\manifest" -i
".git;.hg;.deployment;deploy.cmd"
An error has occurred during web site deployment.
Has anyone else seen this and figured out how to fix it?
There is a known issue with Azure Web Sites where the DLL files are locked due to being in use (since the site is running).
In the Azure portal you can force Azure to unload the profiler DLL file by setting the app setting COR_ENABLE_PROFILING to 0 and hitting save. This will restart IIS and unload the DLL without users seeing any error (just a delay in getting the site). After you make changes you can set it back to 1 and it will start the agent back up. This can also be done via Azure PowerShell.