Effective configuration file identification

I recently ran into a few examples when I had problems determining which .config file points to a specific application or DLL. I was able to figure this out through the trial version and the error, but I hope there is a better way. I would love to hear some suggestions.

Thanks!

+4
source share
2 answers
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); Console.WriteLine(config.FilePath); 
+5
source

If it works, you can use Process Explorer (from Sysinternals, now Microsoft) to check if the file is processing the process.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1300844/


All Articles