在.NET源代码中使用 ConfigurationManager 这个类,虽然引用了using System.Configuration这个包,但是编译时还是报错:错误 CS0103: 当前上下文中不存在名称“ConfigurationManager”。
解决办法是除了在源代码中引用了using System.Configuration,还需在解决方案资源管理器里的“引用”中添加“System.Configuration”。
解决办法是除了在源代码中引用了using System.Configuration,还需在解决方案资源管理器里的“引用”中添加“System.Configuration”。
![图片](https://i-blog.csdnimg.cn/blog_migrate/c78833c8a16b3d120c6a7dfb0d0d16d6.png)