title: error CS2012: Cannot open <executable path> access to <executable path denied>
body: <p>I was working on a WPF application in Visual Studio 2015 and all went well until unexpectedly the build dropped me the CS2012 error inform me that it cannot access/update the executable in the /Debug directory. </p>
  
  <p>I tried the following and it didn't work:</p>
  
  <ol>
  <li>Restart</li>
  <li>Close VS and open the application again</li>
  <li>Build->Clean </li>
  </ol>
  
  <p>I couldn't find any solution in the web so I tried:
  1. to move the whole project directory to another location.
  2. creating a new WPF project and assembling it file by file with copy/pastes.</p>
  
  <p>The weird thing was that in both cases the application worked in the new location. I continued the experimentation (in the original directory) and i tried to build a "Hello World" Console application in the same directory. The result was that the trivial console application didn't work and produced the same problem as the WPF application (CS2012 error).</p>
  
  <p>Since I haven't noticed any activity of another program (i.e., antivirus) trying to quarantine (or changing the file/folder permissions of) this folder, I assume that this has been done by VS somehow but I don't know why. Perhaps it is a bug. </p>
  
  <p>Is anyone has a logical explanation about this problem? And a way to fix it?</p>