问题
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>"C:\Company\install-services.cmd"</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=""C:\Company\install-services.cmd"" />
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>"C:\Company\install-services.cmd"</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=""C:\Company\install-services.cmd"" waitInterval="60000" />
...
来源:https://stackoverflow.com/questions/25329952/generated-sourcemanifest-doesnt-include-additional-runcommand-webdeploy-setti