0

我正在尝试使用 WebDeploy V3 部署一个包。安装过程是在远程计算机上的源文件夹和目标文件夹之间进行同步,并在同步完成后运行某个 powershell 脚本。正在执行的命令是:

'"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 提供程序时遇到它。如果有人遇到类似的问题并有想法或建议,我将不胜感激..

4

2 回答 2

1

从我所见,runCommand用于执行任意命令行可能有点错误。尝试将命令行移动到batorcmd文件中并提供(完整?)路径。只要您不尝试向其传递任何参数,该文件就会被上传并执行。

于 2012-11-29T09:05:33.860 回答
0

For future viewers of this post: I encountered this same specific error (Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted) after adding runCommand provider usage to my MyProject.wpp.targets file for the Web Publishing Pipeline MSBuild process. The path was direct cmd shell input used in order to clear readonly flags with attrib -R.

In my case, my build server was configured with WebDeploy 3.0, while the server targeted by the deployment package was configured with Webdeploy 2.0. After upgrading the target server to Webdeploy 3.0 this particular problem was resolved.

However due to other errors surrounding runCommand (providing the correct path to the destination executable at package runtime) my solution still doesn't work entirely so take this all with a grain of salt.

于 2015-04-01T05:18:46.473 回答