[Feedback] CodeLens doesn't show "References" when starting two Visual Studio instances shortly after each other
- 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/2409085).
[Link to Developer Community feedback item](https://developercommunity.visualstudio.com/t/CodeLens-doesnt-show-References-when-/10864159).
[severity:It bothers me. A fix would be nice] [regression] [worked-in:17.12]
I already asked for guidance in [dotnet/roslyn#77391](https://github.com/dotnet/roslyn/discussions/77391) and was told to create a report through Visual Studio’s “Report a Problem” feature for this.
My daily routine usually looks like this:
Start my PC (or at least wake it from sleep), log in.
Open Git-bash through Windows Terminal in various repositories/folders, git fetch new changes, and pick branches to review/test.
git checkout a remote branch (as detached HEAD), optionally git merge others in there to bulk-test multiple branches.
Start Visual Studio with this project, and let it load in the background.
While the first project is loading, repeat the steps in a different repository, and also start Visual Studio while the first one is still loading. In my case, those solutions contain 15 projects on .NET Framework 4.8 (which are converted to SDK-style in preparation of a future .NET 8 upgrade).
Wait for both solutions to load.
With a high degree of certainty, either one (or both) solutions will be missing the “References” section of CodeLens, despite the C#/VB references being forced on in settings:
image.png
Restarting Visual Studio and waiting longer fixes this problem, but it repeatedly happens at the start of my day; and sometimes I simply forget about this.
There is nothing obvious in logs, so I’d kindly ask you to let me know where to look and which logs would help most in figuring this out.
It feels like it became more obvious since the upgrade to 17.13.0 (and it still happens on 17.13.1); while it wasn’t as obvious or easy to hit with previous versions (such as 17.12). As said, this is my daily routine, and the only thing that changed is the Visual Studio version.
There is a few other reports for similar issues (which were all closed for a lack of feedback), so I hope we can figure this out together. There are also reports of “CodeLens shows - references” and “the References popup doesn’t show results”; but this is not what I’m reporting. The “References” section is completely missing instead.
To find diagnostic information, see the [original linked feedback ticket](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2409085).
Contributor guide
Assessment
This issue has not been assessed yet.