The file is never read-only, but the point about it being locked is a possibility since I am launching the build in a separate process. The processes are managed by a custom .net application that prevents overlap, but if they are somehow leaking file locks (like say when the process is killed unexpectedly) then that could have something to do with it.