For one of my ASP.NET 3.5 applications, every single time I try to build the web app, it throws the following build errors in Visual Studio 2008:
Error 16
Similar to Benoit's answer but doesn't require any tool installation, you can use tasklist (task manager) command at the command line with the '/m' switch to get a list of processes using the dll:
tasklist /m mylocked.dll
I saw some posts indicating you have to do it from the directory of the offending dll, but I haven't found that to be the case.