Questions tagged [codelens]

CodeLens is a code editor enhancement of Microsoft Visual Studio 2013 Ultimate and 2015 Professional and up to show code changes, references, bugs, work items and code review requests.

CodeLens is a code editor enhancement of Microsoft Visual Studio 2013 Ultimate and 2015 Professional and up to show code changes, references, bugs, work items and code review requests. For more info refer: https://learn.microsoft.com/en-us/visualstudio/ide/find-code-changes-and-other-history-with-codelens

114 questions
754
votes
5 answers

How to hide reference counts in VS2013?

Visual Studio 2013 introduced a new feature where it shows you how many times each of your methods are used. I don't find it very useful, and it messes up the spacing of my file. How do I disable it? Can't seem to find the option.
mpen
  • 272,448
  • 266
  • 850
  • 1,236
327
votes
4 answers

How to turn off CodeLens-References

I recently installed Visual Studio 2013 Ultimate. Now, as you know, there is this "n references" above all methods. When I go to the CodeLens options, I can't disable this single feature, since the checkbox is grayed out. So how can I disable it?
IMX
  • 3,602
  • 4
  • 16
  • 11
216
votes
6 answers

How to get list of zero-reference/unreferenced code in Visual Studio

In visual studio 2013 the number of references of a special Code(method, property, field,...) is shown by Code Lens. I want to get unused (zero reference) Code in visual studio. Is there any way to get them? I mean below reference:
Nima Rostami
  • 2,652
  • 3
  • 15
  • 23
110
votes
22 answers

CodeLens not showing references

CodeLens stopped working for some reason in project solution that I'm dealing nowadays. It is not showing references instead "- references". However, when I open up Visual Studio with another project It works like charm.I can confirm that CodeLens…
kkocabiyik
  • 4,246
  • 7
  • 30
  • 40
94
votes
7 answers

Missing CodeLens references count in Visual Studio Community edition 2015 and 2017

Is there a reason why the references count (code lens) is missing in Visual Studio Community edition? Is is possible to enable it in the options? Here is a screenshot of Visual Studio 2015 and 2017 Community edition: Here is a screenshot of…
H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
39
votes
2 answers

How to enable CodeLens for Visual Studio 2017 Community

I recently installed Visual Studio 2017 Community and noticed that there is no CodeLens. I had CodeLens enabled on Visual Studio 2015 Community so I'm hoping that its also available for VS 2017 Community. How can I do so? Or is it no longer…
kimbaudi
  • 13,655
  • 9
  • 62
  • 74
38
votes
4 answers

CodeLens style in-context information in IntelliJ IDEA

For a while now, newer versions of Visual Studio have been able to display in-line information for methods, fields etc relating to how many times they may have been referenced or changed and who changed the code last. This feature is known as…
Adam Williams
  • 1,712
  • 3
  • 17
  • 30
29
votes
2 answers

Display CodeLens above attributes

It is quite annoying to see codelens reference between the field and field's attributes. It requires to add a lot of additional spaces around to make everything readable. Is it possible to display CodeLens reference above the attributes?
Anarion
  • 2,406
  • 3
  • 28
  • 42
26
votes
2 answers

Visual Studio 2015 - CodeLens toggle on/off with keyboard shortcut

I would like to have a quick keyboard shortcut to turn on/off this feature. The feature is useful, but sometimes I want to look only at code and this feature distorts the code visual appearance. I have bound…
watbywbarif
  • 6,487
  • 8
  • 50
  • 64
20
votes
0 answers

How to move CodeLens references indicator?

I don't like it this way: It stretches code and reduces readability. Is there a way to move it to the right side and maybe even change "references" word to some icon, like this: I researched this question, this type of question has been asked…
KulaGGin
  • 943
  • 2
  • 12
  • 27
17
votes
2 answers

Visual Studio 2013 RC CodeLens not showing up

I installed Visual Studio 2013 Release Candidate and after opening a project I noticed CodeLens information is not showing up. In the preview versions you had to turn this on in the options menu, but I can't seem to find this option anymore. Why…
Gerrie Schenck
  • 22,148
  • 20
  • 68
  • 95
14
votes
3 answers

How to extend CodeLens

I'm currently writing a tool to help maintain unit and integration tests (coded tests). I've started extending Visual Studio to make the developer experience nicer, which got me to notice the new-ish CodeLens feature. The stuff I'm currently…
MetaFight
  • 1,295
  • 14
  • 30
13
votes
1 answer

VS2013 - Can code lens appear above method attributes?

Visual Studio 2013 introduced a new feature, Code Lens, where it shows you how many times each of your methods are called/referenced, how many unit tests cover the method, and how many are passing. The code lens information appears above the method…
Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228
12
votes
4 answers

Why does CodeLens always show "0 authors, 0 changes"?

I have a Visual Studio project/solution in a Git repo. Visual Studio's source control feature works a treat (second screenshot). Thanks "Microsoft Git Provider" HOWEVER CodeLens shows "0 authors, 0 changes" for every class and method (first…
Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
9
votes
1 answer

Is there any CodeLens add-on available that shows the git history of the given method?

The latest version of VS 2019 Community came out with CodeLens enabled. Is there any CodeLens add-on available for VS 2019 Community showing the git history of the given method, like this excellent one for Visual Studio Code:…
romanoza
  • 4,775
  • 3
  • 27
  • 44
1
2 3 4 5 6 7 8