views:

43

answers:

1

I have so many bloody different nested folders with different names that were all automatically created by the settings engine that I can no longer tell where the active settings file resides on my machine. Is there a way to determine the path to the active settings file programmatically so I can output it to a debug console?

+2  A: 

It isn't often that I can post the exact same answer within 2 minutes. Copy-and-paste:

I'm going to be a bit blunt about this. The .NET framework design is overall rather excellent. Easy to learn, few surprises, no fat. But not everything is great. System.Configuration has a very high suck factor. Between an absurdly complicated object model and an implementation that was paralyzed by security concerns, it inevitably becomes a PITA when you try to extend it beyond the point-and-click settings designer.

Just don't go there. Using XML serialization to load/save your own configuration class(es) is a wholeheckofalot easier than battling that borked design.

Hans Passant
I do often fantasize about ditching it and going with my own design. :)
chaiguy
What do you need? Kick in the butt? `(_*_)`
Hans Passant
Lol. What I need is for everything else to be working perfectly, and then I will. :D
chaiguy
Ouch, shark infested waters `____/\\___\o/___`
Hans Passant