App config for dynamically loaded assemblies

前端 未结 3 1129
执念已碎
执念已碎 2021-02-04 09:42

I\'m trying to load modules into my application dynamically, but I want to specify separate app.config files for each one.

Say I have following app.config setting for ma

3条回答
  •  不要未来只要你来
    2021-02-04 10:24

    It may work if you change the code little bit:

    public string Name
    {
        get { 
            Configuration conf = ConfigurationManager.OpenExeConfiguration("library.dll");
            return conf.AppSettings.Settings["House"].Value; 
        }
    }
    

提交回复
热议问题