我开发一个.NET 4的应用程序插件,我想一个配置文件添加到DLL,因为我不想把配置在主配置文件。 我已经添加了app.config项目,它正确编译并生成了dllName.dll.config。DLL配置文件(dllName.dll.config)
这里是我的配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="MyTabsConfig" type="NewApp.UI.MyTabsConfigHandler, NewApp.UI" />
</configSections>
<MyTabsConfig>
<MyTabs>
<MyTab Name="First" Leads="2" />
<MyTab Name="Second" Leads="4" />
<MyTab Name="Third" Leads="1" />
</MyTabs>
</MyTabsConfig>
</configuration>
现在我有1个问题: 如果我复制我的主要应用程序的ExtraPlugins目录中的文件,NewApp.UI.dll无法找到调用GetSection(当“MyTabsConfig”)。我认为它在主应用程序文件夹中查找。
谢谢。
可能重复http://stackoverflow.com/questions/594298/c-sharp-dll-config-file – oleksii 2011-12-16 13:23:13