Dynamics CRM 2011 on premise.
I have a registered plugin DLL that is called when the case/incident entity is created.
An exception is raised when this happens. I am investigating this.
The plugin is on disk (C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly) and I have to update it manually when I want to change the code. (This situation was created before me and I won't change it now.)
Whenever the exception is raised, the DLL becomes locked and the only way I can find to overwrite it is to restart IIS.
How can I unlock the file without restarting IIS?
Responses to answers
Which application pool?
None of the pools list the location of the DLL in this list:
The DLL is in C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly
Recycle the App pool. When you recycle the app pool, it'll start up a new one right away, and let the old one finish up, eventually killing any threads that don't finish in a configured amount of time. That should allow you to not have to kill all of ISS. Just make sure you wait long enough for the w3wp worker process to die.