Professional Documents
Culture Documents
Error Snapshot
The reason to this issue is that the assembly is locked by one of the previous processes VS 2010 is unable to delete the previous assembly and copy the new one so the build process fails.
if exist "$(TargetPath).locked" del "$(TargetPath).locked" if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"
But how does this code work? It simply copies the locked file to a new location and lets your build process to be followed.
Source:
Nayyeri K. (2008). File lock issue in Visual Studio when building a project. Retrieved September 13, 2012, from http://keyvan.io/file-lock-issue-in-visualstudio-when-building-a-project