title: .NET Core locking files
body: <p>I have a ASP.NET Core app. I run the application by running the command </p>
  
  <pre><code>dotnet run
  </code></pre>
  
  <p>I'm seeing the following error in one out of five situations when I build this ASP.NET Core app.</p>
  
  <blockquote>
    <p>C:...\error CS2012: Cannot open 'C:...\bin\Debug\netcoreapp1.0\AAA.Web.dll' for writing -- 'The process cannot access the file 'C:...\bin\Debug\netcoreapp1.0\AAA.Web.dll' because it is being used by another process.'</p>
  </blockquote>
  
  <p>In addition to the above issue, I also see no updates that I make in the CSHTML file. I have to stop the <code>dotnet run</code> command, build the app again and then run the <code>dotnet run</code> command.</p>
  
  <p>How can I fix these issues?</p>
  
  <p><a href="https://i.stack.imgur.com/Wdu4D.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Wdu4D.png" alt="enter image description here"></a></p>