RunCommand provider in msdeploy Manifest.xml

I am trying to enable a batch script to run (moreover, provided I can figure it out) as part of the deployment process via msdeploy 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 is working fine, but it doesn't look like my command is actually running. The output log 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 am using 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 pass to the manifest file (which is also in my original package) is recognized (by whatever means) but never executed. Any ideas as to the cause and solution?

+2


source to share


2 answers


MsDeploy also has an auto-provider that deploys the contents of the package. Therefore, you will need to change your command line to

"C: \ Program Files \ IIS \ Microsoft Web Deploy \ msdeploy.exe" -verb: sync -source: package = "package" -dest: auto -setParam: name = parameter set ... -debug - verbose> MsDeployOutput. txt

Also, if you want your manifest to be clicked, you need to change your command line as



"C: \ Program Files \ IIS \ Microsoft Web Deploy \ msdeploy.exe" -verb: sync -source: package = "package" -dest: manifest = "manifestLocation" -setParam: name = parameter set ... debug -verbose > MsDeployOutput.txt

and MsDeploy will do its magic.

Thank,

+3


source


There is a bug in runCommand. To work around this use this attribute MSDeploy.MSDeployKeyAttributeName = "path"



Example: <runCommand path="(call to batch script here)" MSDeploy.MSDeployKeyAttributeName="path" />

+1


source







All Articles