tags:

views:

152

answers:

1

I have a project in C# and I get this error every time I try to compile the project :
(Unable to copy file "obj\Debug\Project1.exe" to "bin\Debug\Project1.exe". The process cannot access the file 'bin\Debug\Project1.exe' because it is being used by another process.), so I have to close the process from the task manager.
my project is only one form and there is no multithreading. what is the solution (without restarting VS or Killing the process)?

+2  A: 

The real problem isn't the error you're getting; it's that the application isn't cleaning up after itself.

It's either holding on to references, not freeing resources, or something else that's causing the process to not end when it's being told to close. Fix up that issue and this problem will resolve itself. We can't really help you with that unless you post your code (and at this point, if you need help with that, you should start a new question).

Jon Seigel
I am working in Tao Framework with C# and I get this problem even with simple templets. there is nothing wrong with the code.
M.H