-
-
Notifications
You must be signed in to change notification settings - Fork 198
Search Syntax
Search for multiple words separated by space (space means AND). Enclose multiple words in double-quotes "" to search for the exact phrase. A single word in quotes means exact match (turns off substring search).
Use syntax like $property Prop
to narrow results down by item kind. Supported kinds:
$project
$projectevaluation
$target
$task
$error
$warning
$message
$property
$item
$additem
$removeitem
$metadata
$csc
$rar
$import
$noimport
Use $import foo.targets
to find where the foo.targets was imported. Use $noimport bar.props
to see why bar.props was not imported.
Add name=Foo
to filter to properties and metadata where name equals or contains Foo.
Add value=Bar
to filter to properties and metadata where the value equals or contains Bar.
Use quotes such as name="exact"
to avoid substring search.
You can scope down search results to search only particular nodes or types of nodes.
- Add the
under(...)
clause to your query to filter the results that are only contained under nodes matching the inner query. - Add the
project(...)
clause to filter results under a specific project (like under, but only matches the nearest parent project, not any of them) - Add the
notunder(...)
clause to exclude results under a specific node. - Add the
not(...)
clause to exclude results matching the subquery
Examples:
$csc under($project Core)
Copying file project(ProjectA.csproj)
You can combine multiple under
, project
and notunder
clauses, which will result in the union of all matching results.
Examples:
-
$metadata name=CopyToOutputDirectory value=PreserveNewest under($item .txt under($additem None))
- searches for *.txt files included in theNone
item group with metadata CopyToOutputDirectory=PreserveNewest. Note how parentheses can include arbitrary nested queries, including nestedunder()
clauses. -
$csc under($project A) under($project B)
- finds all C# compiler task invocations under projects A and B. Results from multipleunder()
clauses are unified, so it's "in either A or B". -
$rar under($1234)
- you can right-click on a project, target or task, and click on "Search in subtree" context menu item to search under that node specifically. It will add theunder()
clause to the search textbox, where $1234 is the node ID. Again, you can combine multiple nodes to search under each of them. -
$csc project(A)
is a special kind ofunder()
clause which only finds results where the nearest parent project node matches the nested query in parentheses. The difference betweenunder($project A)
andproject(A)
is thatunder($project A)
will match any project named A even if it's not the first direct parent, so if project A builds project B, results from project B will be included. In contrast,project(A)
will not match results under project B which itself is under project A. -
$csc under(A) notunder(B) notunder(Evaluation)
matches all Csc tasks under project A which aren't under project B and not under the Evaluation node.
$copy filename
: find all files copied during the build. You can specify a substring of a file name.
$copy directory\path
: find all files copied in and out of the given directory. The results will be grouped into Incoming and Outgoing.
$copy full\file\path
: see the copy operations involving the given file.
If the file was copied from a NuGet package it will show which NuGet package and why the project depends on that package (via which chain of dependencies).
If the file was copied because it was added to None or Content item with CopyToOutputDirectory Always or PreserveNewest, this will be shown as well.
Search for NuGet packages (by name or version), dependencies (direct or transitive) and files coming from NuGet packages.
$nuget project(MyProject.csproj)
: list MyProject.csproj dependencies
$nuget project(MyProject.csproj) Package.Name
: search for Package.Name
in both dependencies and resolved packages
$nuget project(MyProject.csproj) File.dll
: Search for a file coming from a NuGet package
$nuget project(.csproj) 13.0.3
: search for a specific version or version range
Use project(.) or project(.csproj) to search all projects (slow).
Right-click on a project and click "Search project.assets.json" to view NuGet dependencies.
Search for $projectreference project(structuredlogviewer.csproj) core
will find all projects matching 'core' referenced by StructuredLogViewer.csproj directly or indirectly. Search for just $projectreference project(structuredlogviewer)
to show the transitive closure of all projects referenced by StructuredLogViewer.csproj.
If a single StructuredLogViewer.csproj is found, this feature will also display all projects referencing it (the opposite direction).
You can double-click any project in the search results to view the references and referencing projects for that project. You can thus navigate the project reference graph in both directions.
Finds projects of the given height/depth/tier. height=0 finds all projects with no references. height=1 finds projects who only reference projects of height 0. If you specify height=max
it also displays what the max is.
E.g.
$project height=0
$project height=1
...
$project height=max
Add skipped=false
to filter out skipped targets, skipped=true
to only show skipped targets when searching for a target.
Append $time
, $start
and/or $end
to show times and/or durations and sort the results by start time or duration descending (for tasks, targets and projects).
Use start<"2023-11-23 14:30:54.579"
, start>
, end<
, or end>
to filter events that start or end before or after a given timestamp. Timestamp needs to be in quotes.