Reputation: 525
I get the following error when I try to build my project:
"Unable to copy file "obj\Debug\COP Tools.exe" to "bin\Debug\app.publish\COP Tools.exe". Could not find a part of the path 'bin\Debug\app.publish\COP Tools.exe'."
I checked, the bin\Debug\app.publish folder exists within the project.
I know this is a common error and there are lots of discussions regarding this. I think, I read them all. I tried the followings:
Added pre-build event:
if exist "$(TargetPath).locked" del "$(TargetPath).locked" if not exist "$(TargetPath).locked" if exist "$(TargetPath)" move "$(TargetPath)" "$(TargetPath).locked"
I had this issue in the past, then the exit-delete bin/obj folder solution worked. Sometimes only after a few tries. Now, not anymore. I am using Visual Studio 2015 Community Edition. Please, if anyone has any further ideas, let me know. Thanks.
Upvotes: 1
Views: 583
Reputation: 525
Looks like, that, by accident, I found the solution. I tried to build while I was offline and it suddenly worked. I connected to vpn, then failed again. So it had to be something with the network. I got a roaming profile, so checked that, and saw that my project folder had synchronization issues. After resolving those conflicts, I could build the solution. So, I hope this helps someone else too.
Upvotes: 0