DIGIT-ARC read-only archive · snapshot: July 23, 2026

Problem with c# Compiler

8 posts · originally from https://geek.digit.in/community/threads/problem-with-c-compiler.163829/

J
j4jubin Original post #1
Sep 25, 2012 at 11:09 AM
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
RCuber #2
Sep 25, 2012 at 12:15 PM
" 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.
J
j4jubin #3
Sep 25, 2012 at 1:43 PM
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.
RCuber
RCuber #4
Sep 25, 2012 at 2:31 PM
can you post the taskmanager screen shot when the problem is occurring?
dashing.sujay
Sep 25, 2012 at 6:57 PM
Use folderlock to see which process is using that file.
J
j4jubin #6
Sep 25, 2012 at 8:41 PM
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
Sep 25, 2012 at 8:47 PM
^^What's that ICSharpCode running? Are you running Unit Testing?

In that case kill the process and it'll execute I guess.
J
j4jubin #8
Sep 25, 2012 at 9:27 PM
^^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 . :)