CodeLens doesn't work on records
See original GitHub issueVersion Used:
Visual Studio 16.8.0 Preview 2.1 .NET SDK 5.0.100-preview.8.20417.9 Compiler version: ‘3.8.0-2.20418.7 (0276b9b7)’. Language version: 9.0.
Steps to Reproduce:
Enter the following code:
public class Person
{
public string Name { get; init; }
}
public record PersonRecord
{
public string Name { get; init; }
}
public static class Factory
{
public static Person MakePerson(string name)
=> new() { Name = name };
public static PersonRecord MakeRecord(string name)
=> new() { Name = name };
}
Expected Behavior:
Code Lens shows number of references above PersonRecord
and PersonRecord.Name
.
Actual Behavior:
Code Lens is missing for record type and its members:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:22 (18 by maintainers)
Top Results From Across the Web
Codelens doesn't show up for records
I'm updating a project from .NET Core 3.1 to .NET 5.0, and I had a few classes that I wanted to change to...
Read more >CodeLens not showing references - visual studio
Go to Tools -> Options -> Text Editor -> All Languages -> CodeLens then click the "Enable CodeLens" option if it is not...
Read more >CodeLens not working VS 2019 Community (16.11.1)
Go into Tools -> Options... -> Text Editor -> All Languages -> CodeLens. Uncheck "Enable CodeLens" option and click OK. Go back into...
Read more >Practical Microsoft Visual Studio 2015 - Page 46 - Google Books Result
See Figure 2-14 for an example of the commits in CodeLens. Figure 2-14. A record of commits shown in CodeLens As work items...
Read more >Professional Visual Studio 2015 - Page 1265 - Google Books Result
NET, 967–970 output from, 969 tracking changes in editor space, 60–62 records, ... 379–380 TreeView control, 508 troubleshooting email for information on, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has been fixed and is in the latest vs (internal) previews:
Fixed with: https://devdiv.visualstudio.com/DevDiv/_git/a290117c-5a8a-40f7-bc2c-f14dbe3acf6d/pullrequest/279270
Should be in 16.10
I’ll see if i can make some time in the weekend to get this working.