findref
is a simple dotnet global tool designed for searching through a directory of DLLs after a given assembly reference. It supports searching through assemblies targeting netstandard
, netcoreapp
or .NET Framework
Prerequisite: .NET Core SDK >= 2.1
$ dotnet tool install --global findref
$ findref -h
Usage: [arguments] [options]
Arguments:
assemblyname the name of the assembly to look for references to. Case insensitive, matches if the FullName is equal to the argument.
Options:
-?|-h|--help Show help information
-d|--directory <DIRECTORY> the root directory to search through (default: working directory)
-r|--recursive search directory recursively
-v|--verbose write verbose output to stdout
-e|--regex use assemblyname argument as regex pattern
$ findref -v -d $REPOS/FindRef/src/bin/debug/netcoreapp2.1/ dnlib
Loading DLLs from 'src/bin/Debug/netcoreapp2.1/'
FindRef.dll (1.0.0.0) has a reference to dnlib (3.1.0.0)
$ git clone https://github.com/henrihs/findref.git
$ cd findref/src
$ dotnet run -- -r McMaster.Extensions.CommandLineUtils
FindRef.dll has a reference to McMaster.Extensions.CommandLineUtils
docker run --rm -it --volume="$PWD:/assemblies:ro" henrihs/findref [arguments] [options]
Example, to search for NewtonSoft.Json
in the current directoy, use:
docker run --rm -it --volume="$PWD:/assemblies:ro" henrihs/findref -d . Newtonsoft.Json
docker build -t henrihs/findref .