Error: Access to bin file \ Debug \

1

I'm watching some video lessons on Youtube about C # but there is one in question that I can not solve at first.

The C # code I'm using is exactly this below:

using System;

namespace IniciandoProjeto
  {
     class Principal
     {
        static void Main(string[] args)

           {
               Console.WriteLine("Hello World");
               Console.ReadKey();
           }
      }
  }

I'm using CTRL+F5 to see what happens on the screen, but it does not execute. And if you use only F5 is the black screen, only.

The errors that appear to me are these:

Warning 10  Could not copy "obj\Debug\AprendendoVideoAula1.exe" to "bin\Debug\AprendendoVideoAula1.exe". Beginning retry 10 in 1000ms. The process  cannot access the file 'bin\Debug\AprendendoVideoAula1.exe' because it is being used by another process.    AprendendoVideoAula1

   Error    11  Could not copy "obj\Debug\AprendendoVideoAula1.exe" to "bin\Debug\AprendendoVideoAula1.exe". Exceeded retry count of 10. Failed.    AprendendoVideoAula1

   Error    12  Unable to copy file "obj\Debug\AprendendoVideoAula1.exe" to "bin\Debug\AprendendoVideoAula1.exe". The process cannot access the file 'bin\Debug\AprendendoVideoAula1.exe' because it is being used by another process.  AprendendoVideoAula1
    
asked by anonymous 20.11.2015 / 20:39

1 answer

3

There is probably an already running Exe process inside the bin. Then the compiler attempts to rewrite and can not.

It has happened to me many times so just do the steps below that should work.

  

Solution: Press CTRL + SHIFT + ESC, go in the process to find the process LearningVideoAula1.exe in your case, please finalize it and try again.

    
20.11.2015 / 23:10