We practice continuous deployment with TFS (2008) and are looking for a nice way to handle IIS settings changes. MSDeploy seems like it should be the way to handle this, but after much reading and searching, I haven't found a good answer.
The problem with MSDeploy, as I see it, is that you need to create a deployment package using an existing IIS website. I would like to be able to have the appropriate IIS configuration for the website in source control and have the build create the package.
The only way I can see to do this is to hand craft the archive.xml file. Is my thinking correct or is there a better way?
I ended up using powershell web administration module (with PSake for the build) to do this. I would still prefer to do this in a declarative manner.
I've been able to put a bunch of the website settings into my web.config so that they are in source control and easily deploy-able. Not all though. Some seem to get set higher up in the IIS hierarchy and then cannot be overridden by my web.config.
I've never found a way to do this with application pool settings.
For setting up new sites I wrote a small C# WinForms app that uses the programmatic interface to IIS to create the sites and app pools and change their settings. Probably similar to your PowerShell script.
来源:https://stackoverflow.com/questions/9895723/continuous-deployment-of-iis-settings-with-msdeploy