I have seen and experienced problems with app.config/web.config where I had changed the order of elements and the app stopped working.
I believe I fixed the problem by looking at machine.config and following the order in there.
One example is the following question: Common.Logging config exception
The issue was resolved by changing the order the elements appear in the file.
So, the question is, does the order of elements matter?
It appears to me it does.
If it does, is it documented anywhere, an xsd schema maybe?
It appears that at least for the
configSectionselement order does matter.Document http://msdn.microsoft.com/en-us/library/ms228256.aspx states the following:
“If the configSections element is in a configuration file, the configSections element must be the first child element of the configuration element.”
I got this from here: http://social.msdn.microsoft.com/Forums/en-US/clr/thread/60c7b502-f7fc-49e9-b4b0-771b4fb4134e