Azure Web Apps troubleshooting: Profiler .dll locks during deployment
Problem
When deploying a new version of New Relic's .NET agent (NewRelic.Profiler.dll) for your Microsoft Azure Web App, an error message prevents you from continuing until you stop or restart the process.
Solution
Normally the process stops, then the assets are overwritten by the assets that New Relic packs in the site root (located at D:\Home\site\wwwroot\newrelic) during a deployment. To resolve the problem, try either of these solutions.
This solution is available for your Azure Web App if you are attempting to deploy a new .NET agent version over an existing version:
Stop your web app to release the .dll file.
Allow the update to proceed.
Once the deploy is complete, restart the instance.
You can install New Relic's .NET agent into your Azure Web App by using the New Relic Site Extension. (You should only need to install the extension once.)
Navigate to https://yoursite.scm.azurewebsites.net/ and select Site Extensions.
From the Gallery, select the add
icon, then select New Relic.
Follow the instructions to manually add the configuration keys to your web app, and use the option that best fits your needs.
To update the Site Extension: From the Azure Portal, select WebApps > (select your site) > All Settings > Extensions > New Relic.