Im trying to add an app.config file to my DLL, but all attempts have failed.
According to MusicGenesis in \'Putting configuration information in a DLL\' this should
you are correct, you can read the config file of a dll. I struggled with this for a day until i found out that the my config file was the issue. See my code below. it was able to run.
ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = Assembly.GetExecutingAssembly().Location + ".config";
Configuration libConfig = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);
AppSettingsSection section = (libConfig.GetSection("appSettings") as AppSettingsSection);
Console.WriteLine(section.Settings["dnd_shortcodes"].Value);
my Plugin1.dll.config
looked as below;
I found out that my config file lacked the
tag, so look around, your issue could have been different but not so far from mine.