I have an ASP.NET MVC application and I am trying to use Web Deploy but I am getting the following error:
Web Deployment cannot modify the file 'msvcr120.dll' on the destination because it is locked by an external process.
On the server, I can see that this is a result of the SQL Server Spatial types DLL in the bin folder which appears to be in use by the process 'w3wp.exe'. Even when I stop the application, this DLL is in use.
How can I safely end that process without affecting other websites on my server? Is there some alternative strategy I can take that will avoid this issue altogether?
My app makes use of the SQL spatial types and this requires this DLL to be copied to the bin folder of my web application.
UPDATE: By stopping the IIS App Pool for my website, I can finally delete the file and web deploy works, but obviously this is far from ideal if I have to do this every time I perform a web deploy. Any ideas how best to resolve this?
Thank you.