title: Visual Studio Could not write to output file '...\obj\Debug\Foo.Bar.dll"
body: <p>I've got this error while compiling a big c# solution in Visual Studio 2010.
  Each time after compilation I had to delete obj folder of one the projects used by this solution. Otherwise I got the following error:</p>
  
  <pre><code>Could not write to output file '...\obj\Debug\Foo.Bar.dll'
  The process cannot access the file because it is being used by another process
  </code></pre>
  
  <p>I've was looking for a solution all over the Internet and actually found/tried few of them.</p>
  
  <p>For example : a lot of people on dev forums were suggesting not to start the compilation while <strong>UserControl</strong> (in some other sources <strong>From</strong>) designer is opened.</p>
  
  <p>Some other people used <strong>pre-build scripts</strong> for obj folder removal, this particular solution is acceptable, but if the issued project is a widely used library its recompilation will cause recompilation of "parent" projects.</p>