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!
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With