question

MaximilianoSebastianHernandez-7742 avatar image
0 Votes"
MaximilianoSebastianHernandez-7742 asked JiachenLiMFST-9349 commented

Visual Sudio

how to enable the option highlighted in red, which allows you to see where a method is used, for example, I have the enterprise version of visual studio


242990-image.png


dotnet-csharpdotnet-standard
image.png (114.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

cooldadtx avatar image
0 Votes"
cooldadtx answered JiachenLiMFST-9349 commented

That is called CodeLens and should be on by default. To configure it you should be able to right click on it and select CodeLens Options. If for some reason you cannot do that then go to Tools \ Options -> Text Editor \ All Languates \ CodeLens. Ensure it is enabled. References cannot be configured.

Note that if your code base is messed up or really large then it might take a while for CodeLens to get through everything. If you think you might have a corrupt cache then right click the option and have it refresh the cache. Alternatively close the solution and then delete the .vs folder to see if it resets (not sure if that is where CodeLens stores stuff).

243060-image.png



image.png (17.8 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks a lot!!! I've been looking for this for a long time

0 Votes 0 ·
JiachenLiMFST-9349 avatar image JiachenLiMFST-9349 MaximilianoSebastianHernandez-7742 ·

Hi @MaximilianoSebastianHernandez-7742 ,
Glad to see that your problem solved, you could accept the helpful answer to change its status to Answered. It will also help others to solve the similar issue.
Thanks for your cooperation.
The following document shows the Features of CodeLens.
Find code changes and other history with CodeLens


0 Votes 0 ·