Unable to copy file "obj\Release\..." to "bin\Release\..."

This error occurs repeatedly.

Error      1      Unable to copy file "obj\Release\HoldemMyWay.exe" to "bin\Release\HoldemMyWay.exe". The process cannot access the file 'bin\Release\HoldemMyWay.exe' because it is being used by another process.      HoldemMyWay
How can I prevent it?

Who is Participating?
The file HoldmeMyWay.exe is being locked in bin\Release is being used (it is running, for example, or there is a security setting that could be preventing access and mis-reporting).
try manually renaming the '...bin\Debug[ProjectName].exe' to something else (e.g. '[ProjectName]1.exe'). this is just one work-around (I must say I find this a bit weird as one would believe the same lock preventing deletion would also prevent renaming...). It's not a good solution, but it should work. after copying the file you can try and rename the file back to its original name

Hope it helps..
DovbermanAuthor Commented:
There were 4 HoldemMyWay.exe files. Renameing prevented the build conflict. The error did not occur again.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.