そうです、dll の構成ファイルを読み取ることができます。私の設定ファイルが問題であることがわかるまで、私はこれに1日苦労しました。以下の私のコードを参照してください。実行できました。
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);
私Plugin1.dll.config
は以下のように見えました。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="cmd_location" value="http://..."/>
<add key="dnd_shortcodes" value="142,145,146,157,165,167,168,171,173,176,178,404,40"/>
</appSettings>
</configuration>
私の構成ファイルには<appSettings>
タグが欠けていることがわかったので、周りを見回してください。