原因:
在C#的App.config的配置节section中,type属性必须与程序集清单匹配
举例:
1)假设命名空间namespace为:Demo.XmlSection
2)具体实现的类class为:DemoSection
3)程序集为:Test
4)配置文件:type = "Demo.XmlSection.DemoSection,Test"
附上Xml具体配置:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="editionTypeSection" type="DataExportTools.EditionTypeSection,DataExportTool"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<editionTypeSection baseUrl="123" tokenUrl="456">
</editionTypeSection>
</configuration>
网友评论