views:

71

answers:

0

Hi, all.

I have a msdeploy question about how to replace attribute values for providers in source manifests during deployment.

Background:

I use msdeploy to create deployment packages during release builds. I want the packages to be suited for deployment to test/staging/production and need to be able to change configuration values deployment-time. One of the things that needs to be done during deployment is creating message queues (msmq), something that msdeploy doesn't support out-of-the-box (technically you could use a script and have msdeploy invoke it, but that's no fun). I've created a custom provider for msdeploy that enables me to create these message queues during deployment (msmq). Which queues to create and a few settings about them gets specified in a sourceManifest.xml file that looks something like this:

<sitemanifest>
  <msmq path=".\private$\some.application/SomeService.svc" isTransactional="True" shouldGrantNetworkServicePeekWrite="True" userNameToGrantFullAccess="testdomain\username" />
  <!-- more (non-relevant) stuff here -->
</sitemanifest>

The content in the source manifest gets embedded into the package itself.

Question:

How can I replace attribute values for providers?

Specifically, I need to replace the userNameToGrantFullAccess attribute value. The user that needs full access varies between environments. I have a really hacky work-around that I'm kinda embarrassed about, so I'm hoping there's a neat way to do this. I've tried using msdeploy's -declareParam/-setParam and also the -replace command but can't seem to figure out something that works. I was hoping that the DeploymentObjectAttribute parameter kind could lead to something.

Thanks!