Team City: Skip web.config when deploying with Web Deploy
I am deploying a project using build options such as:
systemDeployOnBuild = true
system.DeployIISAppPath = [something]
system.DeployTarget = MSDeployPublish
and a few other options for my IIS Web Deploy server.
How can I prevent the deployment of the web config?
Thank!
Define a property ExcludeFilesFromDeployment
. The value is a semicolon-delimited list of files and wildcards to exclude from deployment.
So to exclude web config define ExcludeFilesFromDeployment=Web.config
Assuming you are using msdeploy via the command line, you can use - pass the parameter like this:
-skip:objectName=filePath,absolutePath="^.*web\.config$"
In this example, I am using regex to exclude all web.configs, but you can also enter the relative path to your web.config file.