Reputation: 1295
I have run into several instances recently where I have had trouble figuring which .config file a given application or DLL is referencing. I've been able to figure it out through some trial and error, but I'm hoping there is a better way. I'd really like to hear some suggestions.
Thanks!
Upvotes: 4
Views: 110
Reputation: 2737
If it's running then you can use Process Explorer (by Sysinternals, now Microsoft) to examine the file handles a process has.
Hope that helps.
Upvotes: 1
Reputation: 1039298
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Console.WriteLine(config.FilePath);
Upvotes: 5