Reputation: 3215
I deploy a project by using build parameters such as:
systemDeployOnBuild = true
system.DeployIISAppPath = [something]
system.DeployTarget = MSDeployPublish
and a few other parameters to target my IIS Web Deploy server.
How can I prevent the web config from being deployed with it?
Thanks!
Upvotes: 4
Views: 2687
Reputation: 5187
Define property ExcludeFilesFromDeployment
. The value is semicolon separated list of files and wildcards to exclude from deployment.
So for exclusion of web config define ExcludeFilesFromDeployment=Web.config
Upvotes: 8
Reputation: 3203
Assuming you are using msdeploy via command line you can use -skip parameter as follows:
-skip:objectName=filePath,absolutePath="^.*web\.config$"
In this example I'm using regular expression to exclude all web.configs, but you can also type in relative path to your web.config file.
Upvotes: 6