2012-11-28 36 views
0

我試圖用WebDeploy V3部署一個包。 安裝過程是在遠程計算機上的源文件夾與目標文件夾之間進行同步,並在同步完成後運行某個powershell腳本。 正在執行的命令是:WebDeploy runco​​mmand問題

'"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:dirPath='C:\source' -dest:dirPath='D:\destination',computerName=XXX -postSync:runcommand='powershell -inputformat none D:\destination\Install.ps1',successReturnCodes=0' 

我們得到以下錯誤:

Info: Using ID '49edd786-d8a0-4acf-be7b-95dd6e1391cc' for connections to the remote server. Performing '-postSync'... Info: 
Using ID '5ef9d005-82fa-4811-9f51-1741c8d622de' for connections to the remote server. 
Info: Adding MSDeploy.runCommand (MSDeploy.runCommand). 
Error: (11/28/2012 4:34:24 AM) An error occurred when the request was processed on the remote computer. Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted. 
Error count: 1. 
Error during '-postSync'. Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 

搜索網這個錯誤,我沒有看到使用runco​​mmand提供商時,誰遇到過它任何人。如果有人遇到類似的問題,並有想法或建議,我會非常感激..

回答

1

從我所看到的,使用runCommand執行任意命令行可能有點bug。嘗試將命令行移入batcmd文件並提供一個(完整的?)路徑。只要你不想傳入任何參數,文件就會被上傳和執行。

0

對於本文的未來瀏覽者:在將Web服務發佈管道MSBuild進程的MyProject.wpp.targets文件添加runCommand提供程序用法後,我遇到了同樣的特定錯誤(Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted)。路徑是直接cmd shell輸入,用於清除只讀標誌attrib -R

在我的情況下,我的構建服務器配置了WebDeploy 3.0,而部署包定位的服務器配置了Webdeploy 2.0。將目標服務器升級到Webdeploy 3.0後,此問題已得到解決。

但是由於圍繞runCommand的其他錯誤(在程序包運行時提供了目標可執行文件的正確路徑),我的解決方案仍然無法完全工作,因此請全力以赴。