Sunday, December 12, 2010

unable to copy file to the process cannot access because in use another process visual studio

ISSUE

vs2010 build error: unable to copy file to the process cannot access because in use another process visual studio

FIX

add following lines of code to the pre-build event command line of your project.

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

No comments:

Post a Comment

comment: