我使用的是带有清单文件的WebDeploy 3.0,该文件同时包含contentPath和runCommand。
<siteManifest>
<contentPath path="C:\Test\Path" />
<runCommand path="echo hello" />
</siteManifest>我遇到了一个问题,runCommand是在contentPath提供程序同步文件(仅限目录)之前执行的,而且只有在通过代理从远程机器执行时才会执行。
以下是直接通过WebDeploy执行时的输出:
Info: Using ID 'xxx' for connections to the remote server.
Info: Adding siteManifest (siteManifest).
Info: Adding virtual path (C:\Test\Path)
Info: Adding file (C:\Test\Path\File)
Info: Updating runCommand (echo hello).
Info: hello
Info: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'.以下是通过WebDeploy代理执行时的输出:
Info: Using ID 'xxx' for connections to the remote server.
Info: Adding siteManifest (siteManifest).
Info: Adding virtual path (C:\Test\Path)
Info: Updating runCommand (echo hello).
Info: hello
Info: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'.
Info: Using ID 'xxx' for connections to the remote server.
Info: Adding file (C:\Test\Path\File)你知道如何在使用WebDeploy代理时在contentPath之前停止RunCommand吗?
发布于 2014-01-13 05:27:38
这听起来像是与远程执行所经历的提交阶段有关。虽然我不能提供直接的解决方案,但您是否考虑过将runCommand迁移到postSync
msdeploy -verb:sync ^
-source:manifest=manifest.xml ^
-dest:auto,computerName=... ^
-postSync:runCommand="echo hello"https://stackoverflow.com/questions/21020818
复制相似问题