20

Error 1:

Error 12 Unable to copy file "obj\Debug\coursework2.exe" to "bin\Debug\coursework2.exe". The process cannot access the file 'bin\Debug\coursework2.exe' because it is being used by another process.

Error 2:

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

I keep repeating getting these two errors. Please explain to me how to solve this.

crthompson
  • 15,265
  • 6
  • 55
  • 78
user1211911
  • 203
  • 1
  • 2
  • 7

1 Answers1

18

I agree with @ahmet that your executable might be already executing while you are trying to build the solution.

  1. Open up Task Manager (Ctrl + Shift + Esc)
  2. Look for executing processes or applications matching your executable name (CourseWorks.exe)
  3. Close them
  4. Retry
Beetee
  • 353
  • 1
  • 8
  • 18
Parv Sharma
  • 12,279
  • 4
  • 45
  • 80