开发者

Why does sometimes, the visual studio loses a class reference?

开发者 https://www.devze.com 2023-02-27 02:04 出处:网络
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开发者_如何

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

精彩评论

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