I have a unit test that works fine locally but when uploaded to TeamCity build server fails with "The process cannot access the file because it is being used by another process."
So I have a couple queries
Cheers
Sysinternals handle.exe is the first step. Or use Process Explorer's Find Handle or DLL
. It's always safer to kill the process than close the handle, though.
Programmatically, it's a matter of writing a kernel driver that reads the Windows handle table.
ProcessMon (for finding) and Unlocker (at least for unlocking) are useful too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With