Problem:
The application has been written to take advantage of the "configSource" attribute and has broken up a large web.config file into many smaller config files. This is great, but presents a problem if you want to use MSDeploy's cool new web config transform mechanism. It will not work on the content of files referenced through configSource.
Solution:
Attach a pre-build event to the csproj file that calls a powershell script included in the project that will merge the contents of the external config files back into the main web.config file prior to the publish and transform operation taking place. Use a conditional statement to control which configurations require the script to be executed so that only your Team Build deploy configurations are affected.
I'll post some more details and code snippets as soon as I get a chance.
4 days ago
No comments:
Post a Comment