Generated *.SourceManifest doesn't include add

2019-09-08 23:55发布

问题:

I'm trying to configure a runCommand to wait more than the default value of 1 second to finish.

This is a sample pubxml code:

  <ItemGroup>
    <MsDeploySourceManifest Include="runCommand">
      <waitInterval>60000</waitInterval>
      <path>&quot;C:\Company\install-services.cmd&quot;</path>
    </MsDeploySourceManifest>
  </ItemGroup>

When I start a deployment, it successfully creates a *.SourceManifest.xml file in the temp package directory, but it only includes the path:

  <runCommand path="&quot;C:\Company\install-services.cmd&quot;" />

Furthermore, I'm deploying the whole web site from Visual Studio.

Is there any way to get more than the path parameter added to the resulting file?

回答1:

Everything is fine except that pubxml item group requires an additional XML element. The final and working result looks like the following code:

  <ItemGroup>
    <MsDeploySourceManifest Include="runCommand">
      <waitInterval>60000</waitInterval>
      <path>&quot;C:\Company\install-services.cmd&quot;</path>
      <AdditionalProviderSettings>waitInterval</AdditionalProviderSettings>
    </MsDeploySourceManifest>
  </ItemGroup>

My markup lacked the <AdditionalProviderSettings> element. Once I've added this element, the *.SourceManifest.xml generated by Visual Studio looked like this code:

...
<runCommand path="&quot;C:\Company\install-services.cmd&quot;" waitInterval="60000" />
...