原因:
在C#的App.config的配置節(jié)section中布疙,type屬性必須與程序集清單匹配
舉例:
1)假設(shè)命名空間namespace為:Demo.XmlSection
2)具體實(shí)現(xiàn)的類(lèi)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>