问题描述
为什么没有列出 dotnetsay
工具?
解决方法
为什么没有列出 dotnetsay 工具?
请注意,def funcname():
return 1
x = funcname()
print(x)
命令确实有助于列出 当前目录 中所有可用的本地工具(如果您将 dotnet tool list
安装为全局工具) ,您可以使用以下命令列出所有全局工具。
dotnetsay
测试结果
有关 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
参考:
-
dotnet tool install
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install -
dotnet tool list
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-list