当在.cs文件的开头添加“using System.Configuration;”语句后,仍然不能找到类“ConfigurationManager”,编译时会出现这个错误:“The name 'ConfigurationManager' does not exist in the current context”,那么很可能还没有添加对System.Configuration引用。
那么怎样添加对System.Configuration引用呢?先打开Solution Explore,张开Project,右击节点Refrences,选择Add References...,在弹出的Add Reference对话框中选择.NET页,找到System.Configuration,选择它,点击确定按钮,就完成了添加,其他引用也类似。
本文详细介绍了在Visual C#2005环境中,当试图使用ConfigurationManager类但遇到编译错误时,如何通过添加对System.Configuration引用的步骤来解决问题。包括操作流程及注意事项,旨在帮助开发者快速定位并解决类似问题。
2954

被折叠的 条评论
为什么被折叠?



