Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, March 1, 2019 2:52 AM
I'm not sure what the feature is called, but, sometimes above a function in C# you will see a little reference that says something to the affect of, 4 references. Then you can click on it and it will show you where in your code that function is being called.
Sometimes this seems to work, sometimes it does not. Anyone know why? Or how to get them to always appear?
Thanks!
Rick
All replies (4)
Friday, March 1, 2019 8:13 AM ✅Answered
Hi Rick,
Welcome to MSDN forum.
The option you mean is "CodeLens", you can find more information from this document.
And since this "reference" option is a sub-option of "CodeLens" option. So please enable the Codelens so that we can use this sub-option.
We can Go tools=>Options=>Text Editor=>All languages=>CodeLens to find the dialog box we need. After that, the reference can work normally.
**For the situation that "Sometimes this seems to work, sometimes it does not.", do you use C++, python or other language, or do you have different vs versions? **Since the prerequisites of this option is for VS professional and enterprise, and only support for C# and VB language, I wonder if it's the cause for "sometimes it does not work". Please check this.
And if you have met all need for this option like using C# in VS professional or enterprise, then I suggest you try to repair the VS and update it to latest version to get it solved.
If my answer is helpful, please give a feedback to let me know. Any update please feel free to share here.
Best Regards
Lance
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].
Monday, March 4, 2019 2:56 AM
Hi Rick,
Sorry to trouble you and just want to confirm that if your issue is solved or not, if not, please feel free to let us know, we will try our best to help you out.
BTW, if you think the reply is helpful and could please mark it as answer, that benefits for other community members who meet the similar issue, thanks in advance.
If you have any other VS general issues, please fell free to let us know. 😄
Best Regards
Lance
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].
Monday, March 4, 2019 6:44 AM
Hi Lance... Sorry to get back to you so late. Thank you for telling me what the name of this feature is. I navigated to the area in options as you said. I noticed that that it was not enabled. I enabled it and it seems to be working now!
Thank you so much for your help. :)
Rick
Monday, March 4, 2019 6:54 AM
Hi Rick,
Thank you for your feedback. Have a nice day!
Best Regards
Lance
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].