The solution I am currently working on, the team made the decision to use habitats
way of publishing projects in our solutions via gulp
tasks. We are finding out however that periodically when we try to publish to our web-root the files are locked and the whole publish process fails because of this.
This causes two problems:-
- Unclean half publishes
- Time wasted, waiting to deploy again
So I want to know a few things:-
- Is there a way to avoid the half publishes or a way to reverse what we have tried to publish?
- Can we get round this intermittent issue of files being locked by a process?
- Is this a fix we can do modifying our gulp scripts if not then any other guidance is appreciated.
Example lock
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Deploy\Microsoft.Web.Publishing.Deploy.FileSystem.targets(96,5):
error : Copying file obj\Debug\Package\PackageTmp\bin\roslyn\csc.exe to C:\inetpub\wwwroot\WebSite.local\Website\bin\roslyn\csc.exe failed.
The process cannot access the file 'C:\inetpub\wwwroot\WebSite.local\Website\bin\roslyn\csc.exe' because it is being used by another process. Error!