I have errors as follow:
Error 11 Could not copy "obj\x86\Debug\programname.exe" to "bin\Debug\programname.exe". Exceeded retry count of 10. Failed.
Can someone tell me how to solve it step by step?
Many thanks.
I have errors as follow:
Error 11 Could not copy "obj\x86\Debug\programname.exe" to "bin\Debug\programname.exe". Exceeded retry count of 10. Failed.
Can someone tell me how to solve it step by step?
Many thanks.
Something has a lock on the executable file, so visual studio cannot replace the exe file on disk.
Are you running your exe? If so, just close it
Try restarting visual studio
Try restarting your machine
If that fails you need to use Microsoft/SysInternals Process Explorer to find out what is locking your file
Edit: The only reason I can think of that would still cause this issue after 1,2 and 3 is that this is a windows service exe that is starting up when windows starts up, so you need to stop the service in the service manager
I guess the file "bin\Debug\programname.exe" is locked by Visual Studio (VS) itself.
When VS is open, and I can not manually delete file "bin\Debug\programname.exe". So I close VS, after that the file can be deleted.
By deleting the old file, the problem is resolved. VS and can build new object without error.