属性不会在当前上下文中存在 [英] Properties does not exist in the current context
问题描述
我有一些字符串存储在我的项目的设置文件。不过,我不能够访问设置文件来存储字符串。
I have to store some strings in the Settings file of my project. However, I am not able to access the Settings file to store the strings.
我肯定已访问属性在较早的项目文件中没有遇到任何问题,存储值。
I definitely have accessed Properties file in an earlier project without facing any problems to store values.
Properties.Settings.Default.test = ...
MyApp.Properties.Settings.Default.test = ...
但这里在当前项目中,我不断地被逼疯通过获取属性不会在目前的情况下
存在是否有已经因为其属性$更改任何设置或东西C $ C>不在智能感知出现?
But here in the current project, I am constantly being driven mad by getting the Properties does not exist in the current context
Is there any setting or something that has changed because of which Properties
does not appear in Intellisense?
推荐答案
我有同样的问题出现时,我一直在复制和粘贴代码插件。事实证明,我不小心留下的其他项目的名称空间的地方,当我复制。通过改变命名空间回到合适的项目,我能够使用属性。
I had this same problem occur when I had been copying and pasting code for plug-ins. It turns out that I had accidentally left the namespace of the other project in place when I copied. By changing the namespace back to the appropriate project, I was able to use the Properties.
这篇关于属性不会在当前上下文中存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!