I was able to create a separate configuration file for each DLL and successfully read the keys. But when I tried to create a custom configuration section, I could not read the DLL from the application configuration. He always wanted to read from EEF Consumer exe.
Here is the code to read from appluted dll application configuration
var appConfig = ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location);
return appConfig.AppSettings.Settings["SomeKeyName"].Value;
Since I was unable to read from the custom configuration section, I ended up using xml and serializing the custom configuration section for the object. Since you just get information about the mail server, you will not have problems using app.config.
source
share