Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSDeploy throwing weird error: Stream data of xxxxx.dll is not yet available

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?

like image 234
Mario Avatar asked May 02 '13 20:05

Mario


2 Answers

I had the same problem. Tried deploying a couple of times with the same error.

Recycling the app pool on the server solved the problem, so that I could run a normal deploy again.

like image 112
Anders Abel Avatar answered Oct 15 '22 12:10

Anders Abel


We are experiencing this problem consistently with SQLite.Interop.dll (used by ELMAH in our web application.) As best I can tell, the problem relates to the fact that the DLL SQLite.Interop.dll is in use by our web app through ELMAH, and for some reason this DLL is not shadow copied. The solution we are using is that recommended here of recycling the app pool upon every deploy. Our command is like:

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:recycleApp -dest:recycleApp="Default Web Site/ourApp",computerName="DeployComputer"

This allows the subsequent msdeploy which syncs our deploy package to succeed. Someone replied to that forum also suggesting using "-enableRule:AppOffline", which we didn't need to try.

like image 33
Carl G Avatar answered Oct 15 '22 13:10

Carl G