I am deploying a number of .Net projects to different servers. To do this my team is using TFS to build, then from the build template calling a ps1 script that uses msdeploy to push to all the different servers. It's all very enterprisey and no, I am not at liberty to switch to something different at the moment. This process has been working for months with no issues.
Today the deploy failed a few times in a row with a few different errors. That alone confuses me (and may not be relevant) but now the one I am getting consistently is this:
An error occurred when the request was processed on the remote computer. The stream data of 'C:\Builds\SomeDirectory\obj\Debug\Package\PackageTmp\AReferencedProject.dll' is not yet available.
This error is happening when my script runs msdeploy. The dll is used by a windows service but the service is stopped (as far as I can tell - the service stop isn't throwing any errors) and the dll is not 'read only'. The dll exists on the machine that is building/deploying as well as the machine that is being deployed to.
I have discovered I can avoid this error if I delete the dll that 'is not available' from the server I am deploying to, but the problem comes right back on each subsequent deploy unless I manually delete this dll before each deploy.
I have seen this problem but I am not pushing to Azure, just to Windows Server 2008. Does anyone know why Microsoft web deploy (msdeploy) would throw this error?