dotnet / dotnet/roslyn

[Feedback] CodeLens sometimes fails to load part of the information (references, test result icon)

Open
#79,721 1 comment 0 reactions 1 assignee Claimed by @JoeRobich View on GitHub
Area-IDE Developer Community Priority:1
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

[Link to AzDO feedback work item](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2418697).
[Link to Developer Community feedback item](https://developercommunity.visualstudio.com/t/CodeLens-sometimes-fails-to-load-part-of/10872162).
[severity:It’s more difficult to complete my work]
When I load the Solution, most of the times it doesn’t show the first part of CodeLens (method/class references, test result icon) anywhere in code files. I have to close Visual Studio and reopen the Solution several times (sometimes more than 30 times) for it to load all information.
Microsoft Visual Studio Professional 2022 v17.13 - CodeLens missing references information.png
Microsoft Visual Studio Professional 2022 v17.13 - CodeLens showing references information.png

¯
Another way to reset it and make it load all info again is by deleting the file “.vs\\v17\.suo”, but it has two drawbacks:

Deleting .suo file also removes all breakpoints and bookmarks, along with the state of open files (then I need to re-create all breakpoints and bookmarks and reopen all files I was working with);
When I close Visual Studio (usually at the end of the day) and reopen the Solution (the next day), the problem comes back.
¯
I’ve already tried to start Visual Studio in -SafeMode, but it:

popped an error dialog box several times;

failed to load code files (see screenshot below);
Microsoft Visual Studio Professional 2022 v17.13 - Error loading solution in SafeMode.png

failed to load several of the Projects under the solution falsely identifying them as “incompatible” (after that, I manually loaded all projects, but it didn’t fix the CodeLens problem and when I closed and reopened VS, the projects were still unloaded and marked as incompatible - I had to delete .suo file to normalize it);

disabled all my VS Extensions (I needed to re-enable them one by one after opening VS in Normal Mode) - I wish it would temporarily disable the extensions, only to load in SafeMode, but when closing and reopening, it would load everything again.

¯
By now, what I’m doing is insisting in closing/reopening VS and the Solution, wishing that it will load CodeLens accordingly. But since I have to do that process many times for it to work, it is making me lose a lot of time that I could be spending on working the code instead of simply trying to make VS do what it should do.

To find diagnostic information, see the [original linked feedback ticket](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2418697).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.