msdeploy 的 Manifest.xml 文件中的 runCommand 提供程序
我试图通过使用清单文件中的 runCommand 提供程序,通过 msdeploy 将运行批处理脚本(更多,前提是我能弄清楚)作为部署过程的一部分。
这就是我的清单文件的样子
<MSDeploy.iisApp>
<iisapp path="Default Web Site/SiteName" />
<dbfullSql path="msdeploy.config" transacted="false" />
...(more calls to providers)
<runCommand path="(call to batch script here)" />
</MSDeploy.iisApp>
清单文件中的所有内容都运行良好,但看起来我的命令并未实际运行。输出日志在应该调用我的命令的末尾给出了这一点。
Info: Adding child runcommand (MSDeploy.iisApp/runCommand).
Verbose: The synchronization completed in 1 pass(es).
Total changes: 85 (82 added, 3 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
我使用以下命令来运行 msdeploy:
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package="package" -dest:iisApp="Default Web Site/SiteName" -setParam:name=bunch of parameters... -debug -verbose > MsDeployOutput.txt
我向清单文件(也在我的源包中)提供的命令被识别(以任何方式),但从未执行。关于原因和解决方案有什么想法吗?
I am trying to include running a batch script (more, provided I can figure this out) as part of the deployment process via msdeploy by using the runCommand provider in the manifest file.
This is what my manifest file looks like
<MSDeploy.iisApp>
<iisapp path="Default Web Site/SiteName" />
<dbfullSql path="msdeploy.config" transacted="false" />
...(more calls to providers)
<runCommand path="(call to batch script here)" />
</MSDeploy.iisApp>
Everything in the manifest file runs fine, but it doesn't look like my command is actually running. A log of the outputs gives me this at the end where my command should have been called.
Info: Adding child runcommand (MSDeploy.iisApp/runCommand).
Verbose: The synchronization completed in 1 pass(es).
Total changes: 85 (82 added, 3 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
I use the following command to run msdeploy:
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package="package" -dest:iisApp="Default Web Site/SiteName" -setParam:name=bunch of parameters... -debug -verbose > MsDeployOutput.txt
The command I give to the manifest file (which is also in my source package) is recognized (in whatever way that may be) but never executed. Any ideas as to the cause and the solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
MsDeploy 还有一个自动提供程序,用于部署包的内容。因此,您必须将命令行更改为
“C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe” -verb:sync -source:package="package" -dest:auto -setParam:name=bunch of参数... -debug -verbose > MsDeployOutput.txt
另外,如果您希望清单生效,则需要将命令行修改为
“C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe” -verb:sync -source:package="package" -dest:manifest="manifestLocation" -setParam:name=一堆参数... -debug -verbose > MsDeployOutput.txt
和 MsDeploy 将发挥其魔力。
谢谢,
MsDeploy also has an auto provider which deploys the content of the package. So you will have to change your commandline to be
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package="package" -dest:auto -setParam:name=bunch of parameters... -debug -verbose > MsDeployOutput.txt
Also, if you want your manifest to kick in, you need to modify your commandline as
"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package="package" -dest:manifest="manifestLocation" -setParam:name=bunch of parameters... -debug -verbose > MsDeployOutput.txt
and MsDeploy will do its magic.
Thanks,
runCommand 提供程序中存在错误。要解决此问题,请使用此属性
MSDeploy.MSDeployKeyAttributeName="path"
像这样:
There is a bug in runCommand provider. To workaround it, use this attribute
MSDeploy.MSDeployKeyAttributeName="path"
Like this:
<runCommand path="(call to batch script here)" MSDeploy.MSDeployKeyAttributeName="path" />