I have only one thing to say to that:
What?! Only one file?!?
I’m a big FinalBuilder fan, and my build/deployment scripts usually have countermeasures for that sort of build-wrecking scenarios.
Above is a short snippet out of a deployment script I wrote (those actions are part of the uninstallation of a previous version). After performing the mundane action of “stop the service” – we continue to the extremes: kill the process in case it decided to mutiny, kill all open file handles, kill all MMC session (which could screw up a service uninstallation) and so on, and so forth.
All these tasks are based on the wonderful PsTools by SysInternals, and provided out of the box as FinalBuilder actions.