msdeploy 的 Manifest.xml 文件中的 runCommand 提供程序

发布于 2024-08-06 17:38:27 字数 1006 浏览 5 评论 0原文

我试图通过使用清单文件中的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏花。依旧 2024-08-13 17:38:27

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,

〆凄凉。 2024-08-13 17:38:27

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" />

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文