I am using NHunspell in an ASP.net web application. NHunspell wraps either Hunspellx86.dll or Hunspellx64.dll, both of which are unmanaged dlls.
The problem is this: when I dispose of my NHunspell object (which calls FreeLibrary
from kernel32.dll
), it seems that IIS is still hanging on to it - as evidenced by both windbg and tasklist /m
. This is problematic if, say, I try to replace that dll using an automated build process, or run an installer to update my web application: everything fails because that dll is in use.
I'm wondering if anyone can confirm my suspicions that it is, in fact, IIS that is caching it? Also, why can I delete managed dlls right out from under IIS (even when tasklist
reports those dlls as used by IIS)?
Finally, I'm looking for suggestions on what to do about actually being able to delete this dll for automated builds/installs?
Thanks very much!