title: System.UnauthorizedAccessException while deleting dll
body: <p>While deleting my .dll file System.UnauthorizedAccessException was thrown. </p>
  
  <pre><code>System.IO.File.Delete("file name here.dll");
  </code></pre>
  
  <p>Error message is as follows:</p>
  
  <blockquote>
    <p>System.UnauthorizedAccessException: Access to the path 'E:\Projeler\Spa Anahtar Üretici\ConsoleApplication2\bin\Debug\AutoGen.dll' is denied.</p>
  </blockquote>
  
  <p>How to solve this problem?</p>