Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - Cannot build a simple project more than once

When I try to build a project twice in successon, i get the following error

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

If I close Visual Studio and reopen it, I can compile it again but only once.

I have my projects hosted on a Windows network share. The server runs Windows 2008 R2 and Im on a Windows 7 machine and Ive tried setting everyone full control on the share and the folder permission, to no avail.

Ive even run the Unlocker program and checked the Windows Share & Storage Manager to see if anything is using it and nothing is! I cant delete the file when this happens either until I close VS.

Is there a setting I am missing in Visual Studio?!


UPDATE

Have removed all antivirus/antispam, disabled firewall.. so zero security.

Have disabled "Enable the Visual Studio hosting process"

Visual Studio is some how the colprupt with not releasing the handle

enter image description here

enter image description here


UPDATE

Another thread that has exactly the same problem but from years ago !!

Destroy process-less console windows left by Visual Studio debug sessions


UPDATE

I copied the files locally, and that didnt work. So I created a new project and then copied all the code in to the new project and now its working (with the files stored locally)

like image 513
Christian Avatar asked Feb 02 '26 06:02

Christian


1 Answers

check your antivirus program is using it or not.

Alternatively use Process Explorer and find for the string - "iFileUploader.exe" and see who's using it. You can easily get the handle and close it.

like image 67
sarat Avatar answered Feb 04 '26 19:02

sarat