You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/finding-references.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Finding references in your code
3
3
description: Explore the Find All References command in Visual Studio to find references to particular code elements in your code, including by reference type.
4
-
ms.date: 04/10/2024
4
+
ms.date: 4/1/2025
5
5
ms.topic: conceptual
6
6
helpviewer_keywords:
7
7
- code editor, find all references
@@ -23,11 +23,17 @@ The results appear in a tool window named **\<element> references**, where *elem
23
23
- Remove any filters on the returned results by choosing the **Clear All Filters** button.
24
24
- Change how returned items are grouped by choosing a setting in the **Group by:** drop-down list box.
25
25
- Keep the current search results window by choosing the **Keep Results** button. When you choose this button, the current search results stay in this window, and new search results appear in a new tool window.
26
+
-**List View** toggles between the treeview and a plaintext list. Some functionality is disabled in list view mode.
26
27
- Search for strings within the search results by entering text in the **Search Find All References** text box.
27
28
28
29
You can also hover the mouse over any search result to see the reference in the context of the surrounding code.
29
30
31
+
:::moniker range="vs-2019"
30
32

33
+
:::moniker-end
34
+
:::moniker range="vs-2022"
35
+

36
+
:::moniker-end
31
37
32
38
## Navigate to references
33
39
@@ -43,12 +49,18 @@ By default, references are grouped by project, then by definition. However, you
43
49
44
50
**Definition** and **Project** are the two default groupings used, but you can add others by choosing the **Grouping** command on the selected item's right-click or context menu. Adding more groupings can be helpful if your solution has numerous files and paths.
45
51
52
+
Grouping is not available in **List View** mode.
53
+
46
54
## Filter by reference type in .NET
47
55
48
-
In C# or Visual Basic, the **Find References** window has a **Kind** column where it lists what type of reference it found. You can use this column to filter by reference type. Select the filter icon that appears when you hover over the column header. You can filter references by Read, Write, Reference, Name, Namespace, and Type.
56
+
In C# or Visual Basic, the **Find References** window has a **Kind** column where it lists what type of reference it found. You can use this column to filter by reference type. Select the filter icon that appears when you hover over the column header. You can filter references by Read, Write, Reference, Name, Namespace, and Type, but the filter only shows the kinds that are relevant in the current set of results.
49
57
58
+
:::moniker range="vs-2019"
50
59

51
-
60
+
:::moniker-end
61
+
:::moniker range=">=vs-2022"
62
+

63
+
:::moniker-end
52
64
After you apply a filter or a filter set, you can easily remove it by using the **Clear All Filters** button.
0 commit comments