Reputation: 51146
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.
Upvotes: 10
Views: 11400
Reputation: 16505
System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath
Upvotes: 10