dotnet-tool-run
0.1.0
See the version list below for details.
dotnet tool install --global dotnet-tool-run --version 0.1.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local dotnet-tool-run --version 0.1.0
#tool dotnet:?package=dotnet-tool-run&version=0.1.0
nuke :add-package dotnet-tool-run --version 0.1.0
dotnet-tool-run
A simple .NET tool to execute other dotnet tools without installing them globally or in a project (a similar approach to npx from npm).
About
This simple tool provides the minimum necessary to run dotnet tools without the need of installing them globally or in a project, since this is not yet supported in dotnet cli.
Features:
Cache. This tool provides caching of used tools in a temporary directory (for better performance).
Version and framework selection. You can specify whatever version you want and the target framework to use in every run.
SourceLink for debugging. The binaries can be debbuged with Source Link. Example (with Developer Command Prompt for VS):
devenv /debugexe c:\Users\rich\.dotnet\tools\dotnet-tool-run.exe
Usage
dotnet-tool-run [options] <TOOL> [<TOOL-ARGS>...]
Where the arguments and options are the following:
Arguments:
<TOOL> The NuGet Package Id of the tool to execute
<TOOL-ARGS> Arguments to pass to the tool to execute
Options:
-v, --version <version> Version of the tool to use
-f, --framework <framework> Target framework for the tool
-?, -h, --help Show help and usage information
This same output can be obtained running the tool with the help option:
dotnet-tool-run -h
Example with the simple dotnetsay
tool:
dotnet-tool-run dotnetsay Hello World!!
Installation
Install the dotnet cli (included in the .NET SDK) and then run the following command:
dotnet tool install -g dotnet-tool-run
Contributions
Feel free to open an issue or a PR if you want to without any problem 😃
License
This project is licensed under the MIT License.
See the LICENSE
file in the root of this repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
This package has no dependencies.