When you try to compile the solution project executes normally. Closing the program and run again and the error is displayed:
"Error 6 Unable to copy file "obj\x86\Release\Ercad.exe" to "..\Deployment\Ercad.exe". The process cannot access the file '..\Deployment\Ercad.exe' because it is being used by another process."

The only way to compile again is closing Visual studio and re-opening.


The solution is ":

 

 

Add lines in Pre-Build Commands on projet:

if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked

posted on 2011-04-01 17:15  喝水的猪  阅读(508)  评论(0编辑  收藏  举报