System.Configuration.ConfigurationManager不可用? [英] System.Configuration.ConfigurationManager not available?

查看:263
本文介绍了System.Configuration.ConfigurationManager不可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个VS2005 C#项目我添加了一个参考System.configuration。 在对象浏览器,我可以看到System.Configuration.ConfigurationManager。 在智能感知System.Configuration只有老ConfigurationSettings,而不是ConfigurationManager中。

In a VS2005 C# project I have added a reference to System.configuration. In the object browser, I can see the System.Configuration.ConfigurationManager. In Intellisense System.Configuration only has the old ConfigurationSettings, and not ConfigurationManager.

我的code    System.Configuration.ConfigurationManager.AppSettings [MySetting]

My code System.Configuration.ConfigurationManager.AppSettings["MySetting"]

被突出显示为语法错误并不会编译。

is highlighted as a syntax error and does not compile.

在一个不同的项目,完全相同的安装方法的效果就好了... ...任何线索,这是怎么回事?

In a different project, the exact same setup works just fine... any clues as to what is going on?

推荐答案

urgh - PICNIC错误。添加裁判错误的项目,在解决方案......

urgh - PICNIC error. Added ref to the wrong project in the solution...

这篇关于System.Configuration.ConfigurationManager不可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆