title: Visual Studio 2017 error Cannot open "X" for writing - access to path is denied
body: <p>I'm sorry I cannot seem to fix this error:</p>
  
  <p><a href="https://i.stack.imgur.com/afIce.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/afIce.jpg" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line    Suppression State
    Error CS2012  Cannot open
    'C:\Users\Usuario\source\repos\WindowsFormsApp1\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.exe'
    for writing -- 'Access to the path
    'C:\Users\Usuario\source\repos\WindowsFormsApp1\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.exe'
    is
    denied.'  WindowsFormsApp1    C:\Users\Usuario\source\repos\WindowsFormsApp1\WindowsFormsApp1\CSC 1   Active</p>
  </blockquote>
  
  <p>I suppose it has something to do with the file being read only? I tried changing it and it reverts to read only, I tried closing and reopening VS, I tried running it as an administrator, I changed the assembly name and default namespace and now it won't even run the debugger</p>
  
  <p>I'm new to C#, I used to do Java and never had an error like this one, sorry if it's something very simple. By the way I'm using Windows 10 with Bitdefender installed</p>