[英]Why does sometimes, the visual studio loses a class reference?
Sometimes, the reference of a method that it's on a static class, just disappeared. 有时,对方法在静态类上的引用就消失了。 That means that it's not painted in the "green" color that's typical of a class, and i can't neither navigate trough this method(right click > go to definition)
这意味着它不会以类的典型“绿色”颜色进行绘制,而且我也无法通过该方法进行导航(右键单击>转到定义)
Why is this happening? 为什么会这样呢?
thx. 谢谢。
You probably have something else closer to your scope (like a property) that has the same name. 您可能还有其他更接近您的范围的名称(例如属性)。
The code editor won't go too much out of its way to guess whether the identifier is a type or a property. 代码编辑器不会过多地猜测标识符是类型还是属性。
This usually happens if you open the file directly without opening the project. 如果直接打开文件而不打开项目,通常会发生这种情况。 I have seen this happening when visual studio loads the source code for a class while debugging(single stepping through the code) for which the project is not loaded.
我已经看到了这种情况,当Visual Studio在调试(未单步执行代码)未加载项目的调试时为一个类加载源代码时。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.