Find All References to View

Find All References to View

You have one option only.

select
object_name(m.object_id), m.*
from
sys.sql_modules m
where
m.definition like N'%my_view_name%'

syscomments and INFORMATION_SCHEMA.routines have nvarchar(4000) columns. So if "myViewName" is used at position 3998, it won't be found. syscomments does have multiple lines but ROUTINES truncates.

How do I find all references without peeking?

v1.22 changed how to go to references across files, see navigating to references across files . At least it doesn't do the editor splitting you describe - you can just cycle through the references going to each file in its already opened editor in turn.

You can DownArrow through the references, and then F4 or Shift-F4 to go that reference in another file.

How can I find all references to fields defined by a C# 9 record?

This is a bug (or not implemented feature if you want call it that way) in Roslyn.

The semantics around records is a mess. See this feedback, this issue, this issue, this issue, this issue

Visual Studio: Refresh Find All References results

After more investigation, this isn't currently possible. However, there's a request for it in the VS community forum. If you think a Refresh for "Find" or "Find All References" would be useful, please vote for the following requests:

  • Add a "refresh" button to "find references" (Shift-F12) window
  • Add a 'Refresh' Button to Find Results tabs


Related Topics



Leave a reply



Submit