none
'Find All References' on classes that implement IDisposable in VS 2015 VB.NET does not work

    Question

  • In VS 2015, when I click 'Find All References' on a class definition for a class that implements IDisposable, it returns MyBase.Finalize() for every class which implements IDisposable.

    NOTE: This happens when I click 'Find All References' on the class definition itself (i.e. Public Class Test123). If I click 'Find All References' on the implementation (i.e. New Test123) then it only fetches instances which use that specific New constructor. This is also confusing. In VS 2010, the class definition itself and all implementations were grouped together in one list, but in 2015 they are NOT.

    Refer to the screenshot below. Even when I mousehover over class Test123, it highlights the MyBase.Finalize() method for both Test123 and Test456

    Visual Studio 2010 does NOT do this. Is this a bug, or a 'new feature'? (Why does it even listMyBase.Finalize()  as a reference? Nobody cares about seeing  MyBase.Finalize() , we just want to find every instance where Test123 is implemented...)

    The difficulty this causes is that for the current project at work, we manually implement IDisposablefor every class. So when I click 'Find All References' on any class, it takes 10-20 seconds to find the references, and then it displays thousands of instances of MyBase.Finalize() (one for every single class). So it's basically completely useless.







    Tuesday, August 2, 2016 8:55 PM

Answers

  • Submitted a UserVoice entry here:

    https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/15832957-fix-find-all-references-for-vb-net-classes-which

    Submitted a bug report here:

    https://connect.microsoft.com/VisualStudio/feedback/details/3090626

    Friday, August 26, 2016 7:31 PM

All replies

  • Hi Ninja Starfish,

    Thank you for your post.

    I did a test and reproduce this situation as yours, it is designed by default in VS. Find All References command on the Object Browser shortcut menus, to locate lines in your project code where a symbol is defined, referenced, or used.

    But your suggestion is very important for us, I suggest you to submit this suggestion to UserVoiceMicrosoft engineers will evaluate them seriously.

    thanks.

    Best Regards,



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Wednesday, August 3, 2016 8:22 AM
    Moderator
  • But how is MyBase.Finalize() equal to Test123?

    And WHY does 'Find All References' return MyBase.Finalize() from EVERY other class? How can that POSSIBLY be helpful to anyone?

    Wednesday, August 3, 2016 12:43 PM
  • Hi Ninja,

    The MyBase.Finalize() is definitelt not equal to Test123.

    But the test on my side is the same result as yours.

    So actually I have the same doubt as yours.

    I think you could submit a feedback and I will vote it for you.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Friday, August 5, 2016 8:18 AM
    Moderator
  • Submitted a UserVoice entry here:

    https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/15832957-fix-find-all-references-for-vb-net-classes-which

    Submitted a bug report here:

    https://connect.microsoft.com/VisualStudio/feedback/details/3090626

    Friday, August 26, 2016 7:31 PM
  • Hi Ninja Starfish,

    Thanks for your unpdate.

    I will vote for you, please wait patiently till the Microsoft engineer solve this ,

    Thank you for your understanding.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Monday, August 29, 2016 9:07 AM
    Moderator