我正在尝试使用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)在网上搜索这个错误,我没有看到任何人在使用runcommand提供程序时遇到过这个错误。如果任何人遇到类似的问题,并有想法或建议,我将非常感谢。
发布于 2012-11-29 17:05:34
据我所知,使用runCommand执行任意命令行可能有点bit。尝试将命令行移到bat或cmd文件中,并提供(完整?)通向那个的路径。只要你不想向它传递任何参数,这个文件就会被上传并执行。
发布于 2015-04-01 13:18:46
该路径是用于清除attrib -R只读标志的直接命令外壳输入。
在我的例子中,我的构建服务器配置了WebDeploy3.0,而部署包所针对的服务器配置了WebDeploy 2.0。在将目标服务器升级到Webdeploy 3.0之后,这个特定的问题得到了解决。
然而,由于围绕runCommand的其他错误(在包运行时提供到目标可执行文件的正确路径),我的解决方案仍然不能完全工作,所以对此持保留态度。
https://stackoverflow.com/questions/13608066
复制相似问题