1

I'm trying to install dotenet ef on Ubuntu 20.4.1 LTS.

First, I've installed the tool globally:

dotnet tool install --global dotnet-ef

As it was not working, then I added this PATH reference to my dotnet tools folder on my .bashrc file:

export PATH="$PATH:$HOME/.dotnet/tools/"

As suggested here: Cannot find command 'dotnet ef'?

Yet when I try to run dotnet ef, I get this error message:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-ef does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

Interestingly if I try to install it again I'm informed it is already installed.

Tool 'dotnet-ef' is already installed.

But if I try to list my installed tools with dotnet tool list I get an empty result:

Tool 'dotnet-ef' is already installed.

I have also checked my ~/.dotnet/tools/ folder and it is empty.

What am I missing here?

Rogerio Schmitt
  • 450
  • 1
  • 4
  • 13
  • Did you use `snap install` to install the dotnet sdk? If so, try `sudo snap alias dotnet-sdk.dotnet dotnet`. Might not help but will at least narrow down the problem – jandrew Dec 12 '20 at 22:32
  • @jandrew I'm not sure if I did. Is there any way I can be sure if I did it or not? – Rogerio Schmitt Dec 12 '20 at 23:31
  • Well, how did you install the .NET SDK on your Ubuntu machine? I'm guessing it was either through one of the package managers (`sudo apt-get`, etc.) or you manually installed it? – jandrew Dec 12 '20 at 23:50
  • I can't remember how I did it, is there any way I can check on how it was? – Rogerio Schmitt Dec 13 '20 at 00:03

0 Answers0