How to hide reference counts in VS2013?

Visual Studio-2013Codelens

Visual Studio-2013 Problem Overview


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.

Visual Studio-2013 Solutions


Solution 1 - Visual Studio-2013

I guess you probably are running the preview of VS2013 Ultimate, because it is not present in my professional preview. But looking online I found that the feature is called Code Information Indicators or CodeLens, and can be located under

> Tools → Options → Text Editor → All Languages → CodeLens
> > (for RC/final version)

or

> Tools → Options → Text Editor → All Languages → Code Information Indicators
> > (for preview version)

That was according to this link. It seems to be pretty well hidden.

In Visual Studio 2013 RTM, you can also get to the CodeLens options by right clicking the indicators themselves in the editor:

editor options

documented in the Q&A section of the msdn CodeLens documentation

Solution 2 - Visual Studio-2013

Another option is to use mouse, right click on "x reference". Context menu "CodeLens Options" will appear, saving all the navigation headache.

Solution 3 - Visual Studio-2013

Workaround....

In VS 2015 Professional (and probably other versions). Go to Tools / Options / Environment / Fonts and Colours. In the "Show Settings For" drop-down, select "CodeLens" Choose the smallest font you can find e.g. Calibri 6. Change the foreground colour to your editor foreground colour (say "White") Click OK.

Solution 4 - Visual Studio-2013

The other features of CodeLens like: Show Bugs, Show Test Status, etc (other than Show Reference) might be useful.

However, if the only way to disable Show References is to disable CodeLens altogether.

Then, I guess I could do just that.

Furthermore, I would do like I always have, 'right-click on a member and choose Find all References or Ctrl+K, R'

If I wanted to know what references the member -- I too like not having any extra information crammed into my code, like extra white-space.

In short, uncheck Codelens...

Solution 5 - Visual Studio-2013

In VSCode for Mac (0.10.6) I opened "Preferences -> User Settings" and placed the following code in the settings.json file

enter image description here

"editor.referenceInfos": false

enter image description here

User and Workspace Settings

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmpenView Question on Stackoverflow
Solution 1 - Visual Studio-2013Mark HallView Answer on Stackoverflow
Solution 2 - Visual Studio-2013Sean FeldmanView Answer on Stackoverflow
Solution 3 - Visual Studio-2013Rob LView Answer on Stackoverflow
Solution 4 - Visual Studio-2013NeoH4x0rView Answer on Stackoverflow
Solution 5 - Visual Studio-2013Christian StrangView Answer on Stackoverflow