Compilation Locked file

Issue solved by adding the following code in the Compilation Prebuild Step. (Project, Properties, Build Events)

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