I have a section in my Web.config file that I want .NET to automatically copy to all the Web.config files in all my configurations (latest build, IAT, UAT, release etc). What magical incantations can I type in my Web.config for that section file to make this happen?
Share
If you are asking how to ensure your linked configuration files (using
configSourceinweb.config) are copied when deploying, ensure that theirBuild Actionis set toContent.You can set this by right-clicking the file in the Solution Explorer and selecting
Properties(Alt + Enter).Update:
Since you are talking about config transforms – these are only applied when you deploy a web project.
You can use the slow cheetah extension to get the transforms to apply on compilation.