How to find out which process actually locks your dll when SharePoint Solution deployment failed
When your SharePoint Solution package include third party or external dlls , you will often see your solution fail to deploy due to the locking of the dlls. Today I will show you how to find which process locks your dlls using Process Explorer.
1. Here is an example that your solution fails to deploy due to dll being locked.
2. Start the explorer by double click the procexp.exe
3. From the find tab click Find Handle or DLL
4.Type the your dll name and click Search
5. I can see all the processes that use my dlls at the moment, it looks like the iis , visual studio and SharePoint timer services might be the trouble. From my experience , it could be Visual studio.
6. Close visual studio and redeploy my solution, it works like charm. Re-search the dll, you can see Visual studio is not in the results.