Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve file being used by another process?

I've been debugging in VS.NET 2010 without issue. But now cannot build. I get the error:

Unable to copy file [filename] to bin\Debug\[filename].  The process cannot access the file bin\Debug\[filename] because it is being used by another process.

I get this error for six different files. I've restart VS.NET 2010 but still get the error. Without restarting the machine, does anyone know how to resolve this?

like image 538
4thSpace Avatar asked Nov 01 '25 16:11

4thSpace


2 Answers

There are a bunch of questions on SO related to this, all with suggestions and recommendations for solving the issue. For me, none worked until I found this one.

In short, if it's the System Process locking the file, and you have the Application Experience service stopped, restart it. Seriously.

like image 127
Eight-Bit Guru Avatar answered Nov 04 '25 08:11

Eight-Bit Guru


the exe's you are compiling and debugging are still running even after you stop debugging. Kill those exe's from task manager and then compile your exe's. After this, compiling would work perfectly.

like image 29
Deepansh Gupta Avatar answered Nov 04 '25 07:11

Deepansh Gupta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!