Sort order of result for “Find All References” in Visual Studio

前端 未结 3 845
醉话见心
醉话见心 2021-02-18 16:07

I\'m currently using Visual Studio 2010, but I don\'t think this is a version specific issue (think it was the exact same way in 2008 as well).

When I want to find out w

相关标签:
3条回答
  • 2021-02-18 16:16

    I pinged the VS team on this one and it turns out that the reason for the wierdness is that Find All References is based on strings instead of numbers. This is why you see 1,2, 25, 3, 35, 4, etc... They are tracking it as a bug and it is slated to be fixed but the timeline is unknown.

    0 讨论(0)
  • 2021-02-18 16:17

    You could try using 'View Call Hierarchy' (Ctrl-K + Ctrl-T (VS2010)) for certain things instead. It sorts alphabetically by the looks of things. Or tools like CodeRush Express or ReSharper (not free) usually have nicer search facilities than those offered by visual studio.

    http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/

    0 讨论(0)
  • 2021-02-18 16:30

    The workaround I am using is to create a collapsed region of 10,000 empty lines at the top to force the 6,000+ lines of code in this function (that I didn't write) to sort by line number correctly using the "Find All References" feature. I keep this region of empty lines in a separate text file and temporarily copy and paste them to the top of the source code when I am frustrated with how the search results are sorting.

    0 讨论(0)
提交回复
热议问题