I have this .dll file I just can't delete:


I have admin rights and the only way of deleting it, is restarting the computer (it doesn't need to be safe mode). This file is generated by Visual Studio and this .dll is the result of a Project (website) build. Every build, Visual Studio overwrites this file. I make a lot of builds every day, but suddenly VS just can't build, because it can't overwrite the file.

If I just open the file's folder, and click on the file, Windows Explorer crashes (by only selecting it). The problem persists even after killing Visual Studio processes (desenv.exe, MSBuild.exe) and IIS Processes.

The Windows Explorer doesn't show any window/popup telling me the file is in use by another process. Actually the window just freezes, and I have to kill the Explorer process.

In the same folder of this .dll, there are some other files I can delete, this PortalGuitarFlash.Web.dll is the only one I cannot.

If I even "click" on it, Explorer instantly freezes:

Debug Folder Not Responding - Freezed

  • I tried using cmd to force delete (del /l PortalGuitarFlash.Web.dll), but cmd freezes
  • I tried renaming obj and Debug folders, explorer freezes
  • I also followed this Super User Question's answer, downloaded "Process Explorer" software to find out if there were any processes locking this file, but they didn't find anything.

I did some additional testing.

I opened CMD again, and tried to delete the file. cmd freezes. If then I try to rename Debug Folder, it shows I can't do it because it's being used by something. Process Explorer software showed me that it was being used by cmd.exe. After killing cmd.exe process and trying to rename again, Explorer FREEZES.

Even if I logoff Windows and log in again, it doesn't work. I have also ran antivirus, disk cleanup and defrag, just as a precaution.

The only way of removing this file is restarting the computer. This happened once yesterday, and once today.

Deleting the file itself is not the problem, but why it's locked is.

Has anyone passed through this problem? Any ideas of what should I do?

  • 1
    Boot to safe mode and delete the file there – Ramhound Nov 28 '15 at 16:13
  • If I remember correctly you can run Sysinternals ProcMon or DiskMon when system starts, so maybe you can log what create this file. – g2mk Nov 28 '15 at 20:04
  • 1
    @AlissonReinaldoSilva So stackoverflow.com/questions/2002273/… – g2mk Nov 28 '15 at 20:19
  • 1
    @AlissonReinaldoSilva I mean that explorer frizzing is not you problem, but you have problem with Visual Studio / .NET(?) probably leaking a handle to the file (you can delete it after reboot) when building. There are plenty of Q-A in this topic and you haven't provided too much details so IMO you might try to go trough stackoverflow.com/search?q=visual+file+locked – g2mk Nov 29 '15 at 16:16
  • 1
    run processexplorer, when you see the explorer hang, create a FULL dump of the hanging explorer.exe with ProcessExplorer. zip the dmp, upload the zip and post a share link here. – magicandre1981 Nov 29 '15 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.