Problem with c# Compiler

j4jubin

----------------
I am facing a weird issue on my machine. Whenever I try to recompile my c# code I am getting this error
"Error Unable to copy file "obj\Debug\xxxxx.dll/exe" to "bin\Debug\xxxxx.dll/exe". The process cannot access the file 'bin\Debug\xxxxx.dll/exe' because it is being used by another process."
I tried using Visual Studio 2010,2012 and #develop. The program compiles fine on the first run, later when i try to recompile the bin folder is getting locked up with some process. The folder will be locked for 20 - 60 seconds . My OS is windows 7 x64 sp1. I 've gone through the solutions found in various development forums. None of them seem to work in my case. If you 've a solution please comment.
 

RCuber

The Mighty Unkel!!!
Staff member
" because it is being used by another process" , I get this when I am using monitoring application like spy++ etc. if you are using any application to monitor your app then close it and then recompile. also try disabling your Antivirus software or application like wireshark etc .
also try cleaning the project and then recompiling it.
 
OP
J

j4jubin

----------------
There is no monitoring tool running. What I don't understand is why the folder is getting locked to 'System' process? Is there any chance that this is associated with windows installation? b'coz i've another machine running on win 7x64 (not sp1) and everything is fine on that machine.
 
OP
J

j4jubin

----------------
task1.jpg task2.jpg sharpdevelop.jpg


Please find the screenshots of taskmanager.

@Sujay I've already done that using Process Explorer. The file(Test.exe) is getting locked to System process. See the attached file.

ProcessExplorer.jpg
 

krishnandu.sarkar

Simply a DIGITian
Staff member
^^What's that ICSharpCode running? Are you running Unit Testing?

In that case kill the process and it'll execute I guess.
 
OP
J

j4jubin

----------------
^^Terminating doesn't help.The file is getting locked to 'System' process.

Thanx for the comments folks. Finally I found the solution after almost 1 week. I've disabled several windows services on my machine and it appears that 'Application Experience' service is needed for .net framework to release the resources immediately . :)
 
Top Bottom