Click here to Skip to main content
15,900,589 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Error 1 Unable to copy file "C:\Users\Bishnu\Documents\Visual Studio 2008\Projects\MajorProjectFinal\BusinessLayer\bin\Debug\BusinessLayer.dll" to "bin\Debug\BusinessLayer.dll". The process cannot access the file 'bin\Debug\BusinessLayer.dll' because it is being used by another process. MajorProjectFinal




i tried to run .exe file of the program located inside bin of my project name MajorProjectFinal . it executed for the first time but when i tried to compile code from my project code i.e. tried to run LoginForm() from program.cs but it generated the following error. how can i recompile without any error please reply soon
with regards bishnu karki
Posted
Updated 6-Nov-11 6:50am
v2

Your process is running in background, open task manager and see in process tab, your process should be running already. Right click on it and select End Process tree option.
 
Share this answer
 
You cannot remove/modify any open file. You cannot do it with any executable file which is loaded by any currently running project.

You need to find out who is holding your file. Sometimes it could be Visual Studio host; I also knew the cases when a Visual Studio help agent does it. Close all versions of Visual Studio, run "Task Manager" (Ctrl+Alt+Delete) to kill unwanted processes. Also, you could simply run some of your applications which you might not correctly terminate.

If you cannot manually find it out, use Sysinternals Process Manager from Sysinternals Suite, see http://technet.microsoft.com/en-us/sysinternals/bb842062[^] or the application WhoLockMe (please find by yourself, I don't have a link, sorry).

—SA
 
Share this answer
 
Comments
Richard MacCutchan 6-Nov-11 16:39pm    
You deserved a 5 from some comments in another Q so I added it here.
Sergey Alexandrovich Kryukov 6-Nov-11 17:33pm    
Thank you, Richard.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900