What is local tools
.NET Core 3.0 introduces local tools. Local tools are similar to global tools but are associated with a particular location on disk. Local tools aren't available globally and are distributed as NuGet packages.
Create project
dotnet new console --language C# --output sr/MyApp
Pack as tool
dotnet pack src/MyApp \
/p:PackAsTool=true \
/p:ToolCommandName=wk-my-app \
/p:PackageId=wk.MyApp \
/p:Version=0.0.1 \
--output __publish__
Install as local tool
dotnet new tool-manifest
dotnet tool install wk.MyApp \
--add-source __publish__
Execute
dotnet wk-my-ap
Uninstall
dotnet tool uninstall wk.MyApp
Top comments (2)
I thought C# is the language by default? Do you need to specify the argument --language?
it more obvious when specify
--language
and easy to switch fromC#
toF#