-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
No executable found matching command "dotnet-ef" #5392
Comments
I'm seeing this too. Note that running |
I hit the same error. Then I changed the current directory to the one where |
Ah, I missed that. You are using |
Too bad dotnet/NuGet don't support "global commands" yet (NuGet/Home#1605). DotNet CLI can only resolve "dotnet-ef" when it is within the project directory. This is something EF can't do anything about. |
Thanks @rowanmiller, I confirm that I indeed can run |
@christianrondeau bingo. We'd need changes to dotnet, NuGet, or VS to make this easier to use. Potential feature requests that may help: https://github.com/dotnet/cli/issues/917, https://github.com/dotnet/cli/issues/2939, NuGet/Home#1605 |
It should work if you If you have PMC, is there a reason you would use |
Closing as there isn't really anything we can do here. |
@natemcmaster thanks for the issue links! @rowanmiller the reason I'm using "dotnet ef" instead of PowerShell commands in PMC is simply because I don't know better yet :P I'm following guides and tutorials to learn ASP.Net Core and EF7 together, so since I usually ran FluentMigrator in PMC, and |
Oh and I confirm it does work when entering the project directory. I think it didn't work before (same error message) because I was missing the EF tools package. |
But |
The PowerShell commands make use that setting - since they have access to all the extra context of PMC. I can see the logic in saying that the dropdown should control the working directory of PMC - though I can also see the logic that says the working directory is at the solution directory. If this were to change, it would be a NuGet change - https://github.com/NuGet/Home. |
@rowanmiller Fine lets continue talk here: I created a default asp.net core .NET Core project with user authentication. When I am inside the project dir on the CMD and do: dotnet ef migrations add init I get the error you see in the screenshot. How can this be? |
You forgot to type "ef" http://ef.readthedocs.io/en/latest/miscellaneous/cli/dotnet.html |
I'm trying to get this to work on Mac, I tried the same instructions but I still get "No executable found matching command "dotnet-ef", even when I'm within the directory for thre project. Any suggestions ? or maybe some extra steps are required for Mac ? |
I confirm that it works for me now, I just forgot to add in my project.json: |
@ErikEJ Thanks with DNXCore50 it worked! |
I just got a problem with this today and have been scaffolding a zillion times before without a problem. I am using "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-22299" with dotnet core version 1.1.0-alpha1-*. The error I get is: Any ideas? |
I ran this from the command-line to get it to work again: Install-Package Microsoft.EntityFrameworkCore.Tools.DotNet -Version 1.0.0-preview3-22299 It seems as the dotnet tools got corrupted for some reason that the dotnet restore couldnt resolve. I tried to clear the package cache etc before I ran the above. After I reinstalled the package dotnet crashed and after that it has begun to work again. |
To anyone targeting EF Core 1.1 who might be wondering why @johanskoldekrans's solution worked, be sure to read the "Upgrading to 1.1" section in the EF Core 1.1 release announcement blog post. As of EF Core 1.1, the EF Core tools package is now |
Changing the package name to Microsoft.EntityFrameworkCore.Tools.DotNet as @benjamincburns mentioned finally did the trick. Thank you! |
@benjamincburns LIFE SAVER THANKS MAN ! |
@benjamincburns Nailed it! Thanks 👍 |
Using Package Manager Console within Visual Studio 2017 RTM, you must first run a CD and be inside the project root folder. |
Has anyone been able to make this work on the GA version of Visual Studio 2017 for Mac? I keep getting message Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.1' has a package type 'DotnetCliTool' that is not supported by project 'EFGetStarted.AspNetCore.NewDb'. when I try to add Microsoft.EntityFrameworkCore.Tools.DotNet, version 1.0.1. |
@reynjoz I get the same error. It can be an error in Visual Studio for Mac. I couldn't find the way to handle database in VS for MAC. |
@reynjoz I found the solution. |
@hkumipig - Few questions.
If above does not fix the problem then share your directory structure and csproj file please. |
@smitpatel Thank you for your response Please see attached file, how i run the 'dotnet ef'.netcoreapp2.0 --------------------------------------------------------------------------------------- |
Already answered to @hkumipig in a different thread. |
Originally reported on comments section of another issue by @christianrondeau
I could not find any solution or reference to a solution in #3925 - I am using
When I run (in the Package Manager Console)
Here's the
dotnet
version:Here's the
project.json
pieces that relate to EF:I have installed
Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1
andMicrosoft .NET Core 1.0.0 RC2 - SDK Preview 1 (x64)
, I have fully uninstalledRC1
before anddotnet restore
works... I'm out of ideas.The text was updated successfully, but these errors were encountered: