我安装了一个用于 dotnet CLI 的工具,为什么命令工具列表没有显示它?

问题描述

查看屏幕截图,以便更好地理解我的问题。

enter image description here

为什么没有列出 dotnetsay 工具?

解决方法

为什么没有列出 dotnetsay 工具?

请注意,def funcname(): return 1 x = funcname() print(x) 命令确实有助于列出 当前目录 中所有可用的本地工具(如果您将 dotnet tool list 安装为全局工具) ,您可以使用以下命令列出所有全局工具。

dotnetsay

测试结果

enter image description here

有关 dotnet tool list -g 命令的更多信息,请查看:

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-list#examples

,

您的问题的答案,要显示您已安装的工具,请使用以下方式之一:

dotnet tool list -g
dotnet tool list --global
dotnet tool list --tool-path C:\Users\samue

练习这些命令

案例安装全局:

dotnet tool uninstall dotnetsay --global
dotnet tool list

dotnet tool install dotnetsay --global
dotnet tool list --global
dotnetsay

案例安装本地:

mkdir C:\foo
dotnet tool uninstall dotnetsay --tool-path C:\foo
dotnet tool list --tool-path C:\foo

dotnet tool install dotnetsay --tool-path c:\foo
dotnet tool list --tool-path C:\foo
cd /d C:\foo
dotnetsay

参考:

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...