Cannot find command 'dotnet ef' and then dotnet-ef.dll isn't in the right folder?

'dotnet ef' refusing to work

There I am, on a Saturday morning trying to create an Entity Framework Core structure for an existing database, and apparently there's no dotnet ef available to me.

After running  dotnet tool install --global dotnet-ef  to install it, it still didn't work, spitting out the error:

The application to execute does not exist: 'C:\Users\robertwray\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'

The tool had been installed into %UserProfile%\.dotnet\tools\.store\dotnet-ef, but into a folder called 2.2.4, rather than the folder name that appeared to be expected. Copying the 2.2.4 folder to 2.2.4-servicing-10062 appears to grant me access to dotnet ef, but I did have to also rename a 2.2.4 folder to 2.2.4-servicing-10062 further down the folder tree that aims to get to  dotnet-ef.dll before the path would match that which was expected and let dotnet ef work.

About Rob

I've been interested in computing since the day my Dad purchased his first business PC (an Amstrad PC 1640 for anyone interested) which introduced me to MS-DOS batch programming and BASIC.

My skillset has matured somewhat since then, which you'll probably see from the posts here. You can read a bit more about me on the about page of the site, or check out some of the other posts on my areas of interest.

No Comments

Add a Comment