May 19, 2010 11:08 PM|tcartwright|LINK
That was how I previously did it. However that method gets pretty ungainly the more sections you replace with all of the different environments. With, dev, demo, stg, and prod environments alone I ended up having 8 files per environment. You have to have
each configsource in its own file. Also there are other added drawbacks like the fact you can not use configsource on section groups. Also unless you specify it, changes to sub files in configsource files will not force a reload of that section into the main
web.config which is cached into memory.
I have also seen complete whole seperate config files that would copy over the main config during the pre-build event. This is also ungainly as you are forced to carry a complete config per environment. This method also has the drawback of changing the web.config
each run so it makes placing the web.config under a source control repository detrimental with a multi person team.
The solution that they came up with in .net 4.0 is actually quite great we just want it to work at debug time.
I have been communicating with the engineers about this and they are mulling over the various issue that arise from dynamically changing the web.config at debug/run time. Most of the issues they are running into revolve around source control and the integration
with all of the designers in the IDE.