title: Build error: "The process cannot access the file because it is being used by another process"
body: <p>I've got a C# <code>webforms</code> app, that until today had been working just swimmingly.</p>
  
  <p>Now today, all of a sudden, every time I try run the app, I get a file locking error: </p>
  
  <blockquote>
    <p>Unable to copy file "obj\Debug\MyProject.exe" to "bin\Debug\MyProject.exe". The process cannot access the file "bin\Debug\MyProject.exe" because it is being used by another process.</p>
  </blockquote>
  
  <p>Googling the error doesn't come up with anything beyond the obvious, i.e. VS thinks the file is locked.  And it is <strong>definitely</strong> Visual Studio itself that locks the file, because when I close VS and reopen it, the project executes fine - the first time.  When I try to run it a second time, I get the file locking error.</p>
  
  <p>Closing VS and reopening every time I want to run the app is not a viable workaround!  How do I find out what's locking the file, and stop it from getting locked?</p>
  
  <p><strong>EDIT:</strong> Another interesting discovery: I don't even have to run the app.  Just compiling it once causes the file locking; I cannot compile twice in a row!</p>
  
  <p>This problem is specific to one project in my solution.  All other projects work fine and can be executed as many times as I like.  It's only this one project that gets itself locked up.     </p>