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?

Thanks,
DovbermanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AeridenCommented:
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).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
APoPhySptCommented:
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..
cheers
0
DovbermanAuthor Commented:
There were 4 HoldemMyWay.exe files. Renameing prevented the build conflict. The error did not occur again.

Thanks,
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.