1

i am a beginner at C# so when i start debugging my project of C# i am getting this error could anyone can help me right now cause i have just couple of hours to complete this project..

Error 1 Unable to copy file "obj\x86\Release\ali.exe" to "bin\Release\ali.exe". The process cannot access the file 'bin\Release\ali.exe' because it is being used by another process.

Dmitry
  • 13,797
  • 6
  • 32
  • 48
Syed Ali Ahmed
  • 61
  • 3
  • 12
  • Do you have the executable running in a command prompt window? – Bauhaus Mar 28 '14 at 22:24
  • possible duplicate of [VisualStudio2010 Debugging - The process cannot access the file ... because it is being used by another process](http://stackoverflow.com/questions/2690119/visualstudio2010-debugging-the-process-cannot-access-the-file-because-it-i) – Dmitry Mar 28 '14 at 22:30

4 Answers4

4

Close your application before hitting "Debug" / "Start Debugging". If your application has no visible window, you may need to end the process "Ali.exe" using the Windows Task Manager.

You may also want to select the "Debug" configuration to actually debug.

helb
  • 7,609
  • 8
  • 36
  • 58
3

Obviously, this exe is running right now.
Stop it in the VS IDE or using the Task Manager.

Dmitry
  • 13,797
  • 6
  • 32
  • 48
0

Press CTRL+SHIFT+ESCAPE to open TASK MANAGER

LOOK FOR :

  • ali.exe
  • End proccess
  • Rebuild
MarredCheese
  • 17,541
  • 8
  • 92
  • 91
Tarun
  • 166
  • 10
-1

I just ran into this problem myself.

It turned out someone else on the work server had the exe running on their computer, and we don't have collaboration/file sharing set up at all.

As soon as he closed the app, the problem vanished.

So, if all else fails, check if a coworker has it running!

Greenwiz29
  • 37
  • 7
  • This sounds like a very specific case, which should not even happen in the first place. – Joery Sep 07 '21 at 16:27
  • Agreed, but that's what I saw. As for why it happened, I don't know. I'm fairly new at this company, so I had no hand in setting up anything. – Greenwiz29 Sep 14 '21 at 19:04