Friday, August 7, 2015

Visual Studio “Could not copy... Exceeded count to 10.Failed” during build


Error:
Error   10  Could not copy "obj\Debug\MyApp.Controlls.dll" to
 "bin\Debug\MyApp.Controlls.dll". 
 Exceeded retry count of 10. Failed.    


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

Cause:
 Most of the time this occurs when the debug process was stopped somewhere in an exception.

Solution 1:
 

Try to Build >> Clean Solution, then Rebuild project


Solution 2:
 

Close Visual Studio, delete the 'bin' and 'obj' folders, then rebuild the project


Solution 3:
 

Go to task manager, localize your project exe file and kill it, then rebuild the project