dotnet / dotnet/roslyn

C# and VB CodeLens windows show "Unknown" instead of the text of the reference

Open
#80,995 0 comments 0 reactions 0 assignees View on GitHub
Area-IDE
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/C-and-VB-CodeLens-windows-show-Unknown/10977034)._

---
1. Add this code to a C# project.

```
int func1() => 1;
int func2() => func1() * 2;
```

Click the 1 reference code lens and then click the icon in the top right to open the Code Lens windows.

Bug: The title bar says "Unknown" which seems like a bug (which doesn't repro with C++ Code Lens). I think it's supposed to show "func1".

C#: incorrect
![image.png](https://aka.ms/dc/image?name=B1569d51747ca4b299a13fd1707dfda8d638951167214906616_20251003-123201-image.png&tid=1569d51747ca4b299a13fd1707dfda8d638951167214906616)

C++: correct
![image.png](https://aka.ms/dc/image?name=Bc47a08a103aa4241bcd65f8bf3e190b2638951167856665048_20251003-123305-image.png&tid=c47a08a103aa4241bcd65f8bf3e190b2638951167856665048)

---
### Original Comments

#### Feedback Bot on 10/5/2025, 08:11 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in a C# project using the two functions shown, then open the func1 reference CodeLens window and compare its title with the C++ behavior described. Trace the CodeLens window's title source and determine why it becomes "Unknown" instead of showing func1; done means the C# and VB title displays the referenced symbol text.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, visualbasic
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.