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!

+3


source to share


2 answers


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

+7


source


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.

+4


source







All Articles