开发者

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 neithe开发者_如何学运维r 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜