question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet ef not working in VS 2017

See original GitHub issue

Steps to reproduce

  • Install VS 2017 RC
  • Create brand new web application with authentication
  • Add the require dependencies for migration builder
  • Open the package manager console and type dotnet ef

The issue

So I upgraded to Visual Studio 2017 and generated a new .net core web application with docker support. I am trying to create a new migration and getting an error about not finding an executable. When I installed 2017 I did check to install .NET core.

I went to look for the project.json file but there is none. I added a nuget package and I still cannot get it to generate a migration file for me.

“Microsoft.EntityFrameworkCore.Design”

If you are seeing an exception, include the full exceptions details (message and stack trace).

Exception message:
Stack trace:
PM> dotnet ef
dotnet : No executable found matching command "dotnet-ef"
At line:1 char:1
+ dotnet ef
+ ~~~~~~~~~
    + CategoryInfo          : NotSpecified: (No executable f...and "dotnet-ef":String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 

Further technical details

Operating system: Windows 10 Visual Studio version: (e.g. VS 2013 or n/a) VS 2017

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:51 (14 by maintainers)

github_iconTop GitHub Comments

10reactions
cdiecommented, Nov 17, 2016

@jrock2004 Look at this post https://blogs.msdn.microsoft.com/dotnet/2016/11/16/announcing-entity-framework-core-1-1/

Have you done this command PM> Install-Package Microsoft.EntityFrameworkCore.Tools.DotNet -Version 1.0.0-msbuild1-final -Pre

3reactions
WouterDeKortcommented, Dec 23, 2016

I’m trying to get this to work on VS2017 RC after upgrading my project. I’ve updated all packages and used Install-Package Microsoft.EntityFrameworkCore.Tools -Pre for tooling.

Now whenever I run Update-Database from the PowerShell Package Manager Console I get the following error:

PM> Update-Database dotnet exec needs a managed .dll or .exe extension. The application specified was ‘C:.…\bin\Debug\netcoreapp1.0<app>.runtimeconfig.json’ Process finished with non-zero exit code

Any idea what I have to do?

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet ef command no longer works after upgrading to ...
This is a breaking change in Entity Framework Core 3.0: The EF Core command-line tool, dotnet ef, is no longer part of the...
Read more >
Troubleshooting the dotnet ef command for EF Core ...
When using EF Core in a .NET Core app (ASP.NET Core or other app sitting on .NET core), it's easy to run into...
Read more >
Installing Entity Framework Core - EF Core
Use the following .NET Core CLI command from the operating system's command line to install or update the EF Core SQL Server provider:...
Read more >
EF Core tools reference (.NET CLI)
Reference guide for the Entity Framework Core .NET Core CLI tools.
Read more >
Install Entity Framework Core
Here, you will learn to install and use Entity Framework Core 2.0 in .NET Core applications using Visual Studio 2017. EF Core is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found