Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global dotnet tool install not finding global tools after installation on Linux with SDK installed #7069

Open
RickStrahl opened this issue Apr 8, 2020 · 1 comment

Comments

@RickStrahl
Copy link

RickStrahl commented Apr 8, 2020

I'm trying to install several .NET Core Tools globally and it looks like the installation is working fine, however the path to launch the files does not appear to be set properly.

What I'm doing:

  • dotnet tool install -g LiveReloadServer (or whatever none of them work)
  • Close the terminal
  • Start terminal
  • Run LiveReloadServer

This results in command not found

image

The tools are installed properly it looks like:

image

Just not linked properly via PATH.

Additional Information

I installed the SDK from the Dotnet download page here, using the instructions on that page:

https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1910#install-the-net-core-sdk

Install seems to work fine otherwise - I can build and run projects etc. But it looks like the installer didn't add the path to ~/.dotnet/tools (or any .dotnet path).

@Swimburger
Copy link

I have a similar issue on macOS. ~/.dotnet/tools can be found in the PATH environment variable, but it still does not work.
I added the following line to the .zshrc file, to add the path to the PATH environment variable without using the tilde shortcut (~).
export PATH=$PATH:~/.dotnet/tools
This seemed to fix it for me. Btw, I use the tilde in this script, but the result in the environment variable is the full path /Users/nswimberghe/.dotnet/tools, so zshell is probably turning that into the full path implicitly.

I'm not sure if using the tilde shortcut is supported on macOS, but it didn't work on my machine, and none of the other paths in the environment variable use the tilde shortcut.
After using the full path, I could invoke global dotnet tools again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants