问题描述
我试图通过使用清单文件中的runCommand提供程序,通过msdeploy将运行批处理脚本(更多,如果我能弄清楚的话)包括在内,作为部署过程的一部分.
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.
这是清单文件的样子
<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)
我使用以下命令来运行msdeploy:
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?
推荐答案
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 =参数束...-调试-详细> MsDeployOutput.txt
"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 =参数束. .-debug -verbose> MsDeployOutput.txt
"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
MsDeploy将发挥其神奇作用.
and MsDeploy will do its magic.
谢谢
这篇关于msdeploy的Manifest.xml文件中的runCommand提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!