16

如何ConfigurationManager.AppSettings在我的 Windows 窗体应用程序中访问?

错误消息显示:当前上下文中不存在名称“ConfigurationManager”。

4

3 回答 3

45

添加对 System.Configuration.dll 的引用。

于 2009-11-25T13:19:13.430 回答
3

在必须去添加对 System.Configuration 的引用才能使用此功能之前,我有过这种经验。

于 2009-11-25T13:20:42.217 回答
3

在解决方案资源管理器中右键单击您的项目,选择添加引用,然后选择 .Net 选项卡(默认情况下应选中),然后选择 System.Configuration

于 2009-11-25T13:24:58.900 回答