My favorite way to tackle this is with the configSource attribute. Admittedly I only use this on one element () but it does provide an easy way to swap in and out different segments of a web.config (which I do during install time via a WebSetup project).