IIS Express Worker Process doesn't release assembly
There could be issues with file locking if you have indexing activated on the directory. May be the problem as it turned out was in the settings of the virtual directory in IIS. If the virtual directory still has the index this location
flag turned on
, it turned out that IIS is placing a temporary lock on these files, even though the web application wasn't being started (ie it was just a compile, not a debug run). After turning the index this location
setting off
the file locking problem will disappear.
See this for more info.
I think the real answer here is that Visual Studio is a bit buggy on that side. This happens also sometimes with desktop applications (winforms or WPF) , where the build fail because of locked output of the project (the exe or dll that you are building).
I have similar problems, sometimes, with Visual Studio professional 2013 and i think it happens also on older versions. When this happens i close Visual Studio and reopen it and this solve all the problems.
Some reference:
Visual Studio 2010 build file lock issues
Visual Studio locks output file on build
Locking files when building in Visual Studio 2010
What I have faced before when debugging the application using other browser than Internet explorer, visual studio will only detach the process, but wont close the service. sometimes when the handle is released the application is not releasing the resources the service is using (for example a log file being accessed or a long running process attached to the session you just left.) as @Michael Mentions there may be a memory leak. I have had to force close IIS, to release the resources. other thing that has happened is that 2 developers in the same machine (RDP) are processing the same server, and the port/libraries are not released as one or the other is using it. Since we don't have a lot more details on your dev environment all pose to "maybe" scenarios.