配置一个configSections,在读取时报异常,代码如下
Dictionary<string, string> _dic = ConfigurationManager.GetSection("sampleSection") as Dictionary<string, string>;异常信息:创建 sampleSection 的配置节处理程序时出错: 未能从程序集“System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中加载类型“ConfigSections.SingleTagSectionHandler”。 (E:\个人测试项目\ConfigSectionTest\ConfigSections\bin\Debug\ConfigSections.vshost.exe.Config line 5)
PS:已经引用:system.configuration.dll异常
Dictionary<string, string> _dic = ConfigurationManager.GetSection("sampleSection") as Dictionary<string, string>;异常信息:创建 sampleSection 的配置节处理程序时出错: 未能从程序集“System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中加载类型“ConfigSections.SingleTagSectionHandler”。 (E:\个人测试项目\ConfigSectionTest\ConfigSections\bin\Debug\ConfigSections.vshost.exe.Config line 5)
PS:已经引用:system.configuration.dll异常
解决方案 »
- Cannot read from a closed TextReader
- 【有难度】请问有没有办法根据电影的名字自动从网上获得电影的图片?
- 在自定义控件中继承ICallbackEventHandler
- C#生成的dll可以被其他程序vc6,vb6,delphi,flash等调用吗。请那位大狭给点提示。
- sharepoint 流程开发
- showdialog 后如何再次显示及checkedlistbox 设置每个项的高度
- 有南昌的吗?有人知道南昌鼎光 没(散分)
- 我如何得到datagrid中我所选定行的值(多选)?
- C# List 排序 菜鸟求救
- listBox???
- DataGridViewComboBoxColumn列为空
- 各位大虾,如何实现这样的功能?
ConfigurationUserLevel.None);
var s = (TestConfigurationSection) config
.GetSection("sampleSection ");
好了,记得给分哦。