Link to home
Create AccountLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with solving error

Hi,

When attempting to run my application I receive the following 2 errors. How do I fix those two errors?

1. Could not copy "obj\x86\Debug\AP29_XMLA.exe" to "bin\Debug\AP29_XMLA.exe". Exceeded retry count of 10.

2. Unable to copy file "obj\x86\Debug\AP29_XMLA.exe" to "bin\Debug\AP29_XMLA.exe". The process cannot access the file 'bin\Debug\AP29_XMLA.exe' because it is being used by another process.      AP29_XML

thanks,

Victor
SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ps.  A reboot should also cure it.
Hi Victor;

This could also happen if in your code you open a file then you quit the application in the middle of debugging and that leaves the file in use. So when you run your application again you can't access the file because it is being held by another process. Every time you run your app it starts a new process and the cause of the error.

By the way if you terminate Visual Studio and restart it, it will work again until you hit the problem again. Place code like that in a using statement and make sure you are not in that block when you terminate the debug session.
Avatar of Victor  Charles

ASKER

Hi Fernando,

I will try it, noticed if zi rename the assembly and rootname thr the error fors noy occur. According to task manager there are no other instances running.

Victor
According to task manager there are no other instances running.
And yet the OS see one.
Yes, that is very strange.
Leave the names the same.  Reboot.  Does the error still happen?
I will try it later and get back to you.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you for all the comments.

Victor