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/find-in-files.md
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Search within Specific Files with 'Find in Files'"
3
3
description: Explore the Find in Files feature in Visual Studio and discover how to use the feature to search a specific set of files.
4
-
ms.date: 1/12/2024
4
+
ms.date: 11/1/2024
5
5
ms.topic: conceptual
6
6
f1_keywords:
7
7
- vs.findinfiles
@@ -137,23 +137,34 @@ The **File types** option indicates the types of files to search through in the
137
137
138
138
:::image type="content" source="media/find-file-types.png" alt-text="Screenshot of the File Types section of the Find In Files dialog box.":::
139
139
140
-
You can search for multiple file types by separating them with a semicolon (`;`). You can also can exclude folders and files by prefixing any path or file type with an exclamation mark (`!`).
140
+
You can search for multiple file types by separating them with a semicolon (`;`). You can also exclude folders and files by prefixing any path or file type with an exclamation mark (`!`).
141
141
142
142
### Append results
143
143
144
144
Use this option to append the results from the current search to previous search results.
145
145
146
146
::: moniker-end
147
147
148
-
## Search results
149
148
150
149
:::moniker range=">=vs-2022"
151
150
151
+
## Search results
152
+
152
153
When you perform a search for all results, results appear as they become available.
153
154
154
155
> [!NOTE]
155
156
> Visual Studio begins building an index after your code context is loaded, such as when opening a new project, changing branches, or otherwise changing the file list. If you search while Visual Studio is still indexing your source files, you might see a warning that results are incomplete.
156
157
158
+
With Visual Studio 17.12 and later, if you want to repeat the same search after doing further work, you can click the clockwise arrow icon to refresh the results. This ensures all changes you've made since the last Find are reflected without having to reopen the Find window.
159
+
160
+

161
+
162
+
## Modify find
163
+
164
+
Use the **Modify Find** button (**Repeat Find** in some versions) in the results window to refine the search criteria without having to recreate the same search criteria in the Find window. Clicking **Modify Find** reopens Find in Files with your prior search criteria for that set of results.
165
+
166
+

167
+
157
168
:::moniker-end
158
169
159
170
### Keep results
@@ -184,4 +195,4 @@ In Visual Studio 2022 and later, you can set Visual Studio to always keep result
184
195
185
196
-[Replace in files](../ide/replace-in-files.md)
186
197
-[Find and replace text](../ide/finding-and-replacing-text.md)
187
-
-[Visual Studio commands](../ide/reference/visual-studio-commands.md)
198
+
-[Visual Studio commands](../ide/reference/visual-studio-commands.md)
Copy file name to clipboardExpand all lines: docs/ide/reference/command-prompt-powershell.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,13 @@ Start the Developer PowerShell for the Community Edition of [Visual Studio 2022
232
232
233
233
For Developer PowerShell, the starting directory of the shell is the Visual Studio Project Location. This default locale overrides any other paths, such as working directory. This behavior can be turned off by using the command-line argument `-SkipAutomaticLocation`. This can be useful if you want the shell to stay in the current directory after initialization.
234
234
235
+
::: moniker range="vs-2019"
235
236
The Project Location can be adjusted in **Tools** > **Options** > **Projects & Solutions** > **Project Location**.
237
+
::: moniker-end
238
+
239
+
::: moniker range="vs-2022"
240
+
The Project Location can be adjusted in **Tools** > **Options** > **Projects & Solutions** > **Locations**.
241
+
::: moniker-end
236
242
237
243
> [!TIP]
238
244
> The command-line arguments `-Arch`, `-HostArch`, and `-SkipAutomaticLocation` are supported by both the `Launch-VsDevShell.ps1` script and the `Enter-VsDevShell` cmdlet.
Copy file name to clipboardExpand all lines: docs/ide/visual-studio-search.md
+33-6Lines changed: 33 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Use Visual Studio search to find code & do queries
3
3
description: Explore the Visual Studio search feature and discover how to find settings, menus, code, and work with filters, queries, and more.
4
-
ms.date: 07/02/2024
4
+
ms.date: 11/1/2024
5
5
ms.topic: how-to
6
6
helpviewer_keywords:
7
7
- environments [Visual Studio], navigation
@@ -28,6 +28,9 @@ The Visual Studio integrated development environment (IDE) has many menus, optio
28
28
29
29
If you're using Visual Studio 2022 [version 17.6](/visualstudio/releases/2022/release-notes-v17.6) or later, the search experience is **All-In-One Search**.
30
30
31
+
> [!TIP]
32
+
> To learn more about the new search experience, see both the [Better search in Visual Studio](https://devblogs.microsoft.com/visualstudio/new-better-search-in-visual-studio/) and [All-In-One Search available in 17.6](https://devblogs.microsoft.com/visualstudio/all-in-one-search-available-in-17-6/) blog posts.
33
+
31
34
### About the All-In-One Search experience
32
35
33
36
With **All-In-One Search**, not only can you search for features, but you can also search your code elements, such as files and symbols.
@@ -57,14 +60,38 @@ In Visual Studio 17.11 and later, you can set the scope of code search to the cu
57
60
58
61
:::image type="content" alt-text="Screenshot of code search scope options." source="./media/vs-2022/search-code-scope.png" :::
59
62
60
-
> [!TIP]
61
-
> To learn more about the new search experience, see both the [Better search in Visual Studio](https://devblogs.microsoft.com/visualstudio/new-better-search-in-visual-studio/) and [All-In-One Search available in 17.6](https://devblogs.microsoft.com/visualstudio/all-in-one-search-available-in-17-6/) blog posts.
62
-
63
-
The text filter (**Shift**+**Alt**+**F**) in Code Search is available in preview in Visual Studio 17.9 and later. See [17.9 Preview 3 brings exciting changes to Code Search
64
-
](https://devblogs.microsoft.com/visualstudio/17-9-preview-3-brings-exciting-changes-to-code-search/). Search for a text string, with options to match the case, match whole words, or use a regular expression. The regular expression format is described at [Regular expressions](/dotnet/standard/base-types/regular-expression-language-quick-reference).
63
+
The text filter (**Shift**+**Alt**+**F**) in Code Search is available in preview in Visual Studio 17.9 and later. See [17.9 Preview 3 brings exciting changes to Code Search](https://devblogs.microsoft.com/visualstudio/17-9-preview-3-brings-exciting-changes-to-code-search/). Search for a text string, with options to match the case, match whole words, or use a regular expression. The regular expression format is described at [Regular expressions](/dotnet/standard/base-types/regular-expression-language-quick-reference).
65
64
66
65
:::image type="content" alt-text="Screenshot of text search with various options." source="./media/vs-2022/search-text-search-text-options-highlighted.png" :::
67
66
67
+
#### Navigate to a specific line in Code Search
68
+
69
+
With Visual Studio 17.12 and later, you can now navigate to a specific line in the current document or other specified document.
70
+
71
+
To go to a line in the *current* document, type colon (`:`) followed by the line number. For example, `:39` navigates to line 39 in the active file.
72
+
73
+

74
+
75
+
You can also go to a line in a different document by typing the filename, colon, and then the line number. For example, `Order:43` navigates to line 43 in *Order.cs*. If you don't specify the exact file name, then the search will try to find the best match.
76
+
77
+

78
+
79
+
#### Dock as a tool window
80
+
81
+
With Visual Studio 17.12 or later, you can dock the search window instead of having it floating in front. This can be helpful to avoid interrupting your code editing. Use the icon near the top right of the window to enable docking as a tool window.
82
+
83
+

84
+
85
+
You can use a similar icon on the tool window to revert back to the floating window.
86
+
87
+
#### Toggle preview pane
88
+
89
+
With Visual Studio 17.12 or later, you can toggle the preview pane. Use the eye icon to disable or enable the preview pane.
90
+
91
+

92
+
93
+
Also new with Visual Studio 17.12, the preview panel's position automatically adjusts based on the dimensions of the search window.
94
+
68
95
::: moniker-end
69
96
70
97
## Search in Visual Studio 2022 version 17.5 or earlier
For projects containing only JavaScript that do not require building, set this property to `false`. Newly created React, Vue, and Angular projects usually fall in this category. In this scenario, build is used for production and not for debugging. Note that the `Build` and `Publish` commands are separate in JSPS projects, and `Publish` still runs even if this property is set.
56
+
For projects containing only JavaScript that don't require building, set this property to `false`. Newly created React, Vue, and Angular projects usually fall in this category. In this scenario, build is used for production and not for debugging. Note that the `Build` and `Publish` commands are separate in JSPS projects, and `Publish` still runs even if this property is set.
57
57
58
58
## Command Properties
59
59
@@ -119,7 +119,7 @@ If you modify the command, include `npm run` when using `npm`.
119
119
120
120
### PublishCommand
121
121
122
-
The `PublishCommand` property specifies the behavior for the `publish` target. If the associated `package.json` contains a `publish` script, the default `PublishCommand` value is already set to run this script. In npm, it is common to have pre- and post- publish scripts, which will also run.
122
+
The `PublishCommand` property specifies the behavior for the `publish` target. If the associated `package.json` contains a `publish` script, the default `PublishCommand` value is already set to run this script. In npm, it's common to have pre- and post- publish scripts, which will also run.
123
123
124
124
If you modify the command, include `npm run` when using `npm`.
Copy file name to clipboardExpand all lines: docs/javascript/tutorial-asp-net-core-with-angular.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,8 @@ Starting in Visual Studio 2022 version 17.3, you can publish the integrated solu
142
142
143
143
The publish process takes more time than it does for just an ASP.NET Core project, since the `npm run build` command gets invoked when publishing. The [BuildCommand](../javascript/javascript-project-system-msbuild-reference.md#buildcommand) runs `npm run build` by default.
144
144
145
+
If you publish to a folder, see [ASP.NET Core directory structure](/aspnet/core/host-and-deploy/directory-structure) for more information on the files added to the *publish* folder.
Copy file name to clipboardExpand all lines: docs/javascript/tutorial-asp-net-core-with-react.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,8 @@ The React app appears and is populated via the API. If you don't see the app, se
133
133
134
134
The publish process takes more time than it does for just an ASP.NET Core project, since the `npm run build` command gets invoked when publishing. The [BuildCommand](../javascript/javascript-project-system-msbuild-reference.md#buildcommand) runs `npm run build` by default.
135
135
136
+
If you publish to a folder, see [ASP.NET Core directory structure](/aspnet/core/host-and-deploy/directory-structure) for more information on the files added to the *publish* folder.
Copy file name to clipboardExpand all lines: docs/javascript/tutorial-asp-net-core-with-vue.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,8 @@ Starting in Visual Studio 2022 version 17.3, you can publish the integrated solu
136
136
137
137
The publish process takes more time than it does for just an ASP.NET Core project, since the `npm run build` command gets invoked when publishing. The [BuildCommand](../javascript/javascript-project-system-msbuild-reference.md#buildcommand) runs `npm run build` by default.
138
138
139
+
If you publish to a folder, see [ASP.NET Core directory structure](/aspnet/core/host-and-deploy/directory-structure) for more information on the files added to the *publish* folder.
0 commit comments