views:

1938

answers:

2

I want to know which *.config file the ConfigurationManager is using. How can I figure that out?

For instance, you could be changing working directories and execute libraries from various paths. I'd love to have a way to display something like "Reading AppSettings from c:\MyApp\app.config" in my Trace.

+3  A: 

Try here --> MSDN

Not trying to take the lazy way I just don't know more then what is on that page myself.

Refracted Paladin
I have seen a lot of people not going there anymore. Including me ..at times :)
Perpetualcoder
They don't help themselves out much. It is one of the most unwieldy sites around. As a rhetorical side, is it better to post links or copy,paste in these cases...
Refracted Paladin
+4  A: 
System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath
David Morton