Michael
Michael

Reputation: 13616

Error 166 Unable to copy file "obj\x86\Debug\FileName.exe" to "bin\Debug\FileName.exe"

Suddenly began to get this error when I try to Build a project:

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

Any idea what cause to this error and how to solve it?

Upvotes: 1

Views: 1387

Answers (1)

CodeCaster
CodeCaster

Reputation: 151588

Any idea what cause to this error

Like the error says:

The process cannot access the file 'bin\Debug\ObjectRecognitionDriver.exe' because it is being used by another process.


and how to solve it?

Restarting Visual Studio usually solves this. What have you tried?

Using the tool Handle you can find out which process is locking the file.

Upvotes: 2

Related Questions