我是新来的VS 3.5,我正在编写一个控制台应用程序,需要从app.config文件中提取一些关键值。ConfigurationManager未找到
我:
Imports System.Configuration
,我试图引用ConfigurationManager.AppSettings
但是这会产生错误:
Name ConfigurationManager is not declared
我缺少什么?
我是新来的VS 3.5,我正在编写一个控制台应用程序,需要从app.config文件中提取一些关键值。ConfigurationManager未找到
我:
Imports System.Configuration
,我试图引用ConfigurationManager.AppSettings
但是这会产生错误:
Name ConfigurationManager is not declared
我缺少什么?
请确保您有向大会System.Configuration.dll
添加引用System.Configuration参考:
菜单栏 - >项目 - >添加引用... - > .NET(标签) - > System.Configuration - > OK
我自己有这个问题,实际上包含了对System.Configuration的引用,它仍然不会显示出来。我不得不去生成菜单,选择清洁,然后重新生成。
发帖,因为在六个月内,当我看到这一次我可能会忘了我没有...
尝试使用System.Configuration;
OR
尝试通过选择
项目添加引用 - >添加引用 - > .NET - >选择System.Configuration
现在你可以使用 “ConfigurationManager中”
是的,谢谢你的回应。我最终确定了我自己的! – DeveloperM 2010-12-13 17:04:50