App.config文件出错,配置系统未能初始化。

如果配置文件中包含 configSections 元素,则 configSections 元素必须是 configuration 元素的第一个子元素。",将appSettings放到configSections 后,则正常。

configSections中的元素必须和下面的自定义配置节一一对应。

例如 下面有4个自定义配置节,但是在configSections只有3个,就会出错:配置系统未能初始化。

<configSections>
   <section name="A_F63_Structure" type="A_F63_StructureHandler,PkgBuilder" />
   <section name="A_F10_Structure" type="A_F10_StructureHandler,PkgBuilder" />
   <section name="A_F11_Structure" type="A_F11_StructureHandler,PkgBuilder" />
</configSections>

<C_F10_Structure>

</C_F10_Structure>

<A_F63_Structure>

</A_F63_Structure>

<A_F10_Structure>

</A_F10_Structure>

<A_F11_Structure>

</A_F11_Structure>

posted @ 2011-05-13 10:21  白金龙  阅读(331)  评论(0编辑  收藏  举报