UPDATE: see Microsoft's official response below. I imagine there is a non-offical hack to accomplish this, so I'm leaving the question up.
UPDATE 2: Vote up my WebDeploy feature request to Microsoft on this issue.
I use MSDeploy heavily at my shop, and have spent hours trying to define an msdeploy parameter that will modify an "additional provider setting" for a deployment provider at deploy time. I came up empty on this when searching online and with Reflector on the Web Deploy binaries.
Specifically, I'm trying to allow command line options to manipulate the "DropObjectsNotInSource" and "BlockWhenDriftDetected" settings for DacDeployOptions of the dbDacFx provider.
I've tried every XPath expression I can think of to modify the DACFx options like these from a manifest.xml file:
<sitemanifest>
<dbDacFx path="C:\Database.dacpac"
DropObjectsNotInSource="False"
BlockOnPossibleDataLoss="True" />
</sitemanifest>
Using the msdeploy setParam
with the kind DeploymentObjectAttribute
always fails to find any matching nodes on //@DropObjectsNotInSource
.
I suspect it fails because the value of DropObjectsNotInSource
is actually stored in the attribute "MSDeploy.MSDeployProviderOptions" for the provider's node within the package's archive.xml file. (This attribute value seems to be a .Net serialized instance of the Microsoft.Web.Deployment.DeploymentProviderOptions, so it would be quite difficult to manipulate it with plain old XPath.)
Is it possible to modify these additional provider settings at deploy time?
UPDATE: I sent an email to the Microsoft Web Deploy team via their blog as well as posting here. The Web Deploy team was awesome in getting a response to me (thanks Harsh and Ranjith!). Unfortunately, the official word is this is not supported.
From: Ranjith Mukkai Ramachandra ...@microsoft.com
Subject: RE: Can MSDeploy setParam modify "additional provider settings"?
Date: February 15, 2013 5:20:46 PM EST
To: Web Deployment Support
Hi Steve,
Sorry, this is currently not supported.
Thanks, Ranjith