Entity Framework Tools not working after update to EF Core 1.1.0
See original GitHub issueSteps to reproduce
Update .NET Core packages (including ASP.NET Core and EF Core) in solution from 1.0.0 to 1.1.0.
Update package "Microsoft.EntityFrameworkCore.Tools" : "1.0.0-preview2-final"
to "Microsoft.EntityFrameworkCore.Tools" : "1.1.0-preview4-final"
. Alternatively, change to package "Microsoft.EntityFrameworkCore.Tools.DotNet" : "1.1.0-preview4-final"
as per the anncouncement.
The issue
When using the Microsoft.EntityFrameworkCore.Tools
package and trying to invoke any dotnet ef
command on the console, the error message is thrown:
No executable found matching command “dotnet-ef”.
When using the Microsoft.EntityFrameworkCore.Tools
package and trying to invoke any entity framework tooling command on the Package Manager Console, the same error is thrown:
PM> add-migration Test No executable found matching command “dotnet-ef”
When trying to install the package Microsoft.EntityFrameworkCore.Tools.DotNet
via Package Manager Console, the following error message is thrown:
install-package : Package ‘Microsoft.EntityFrameworkCore.Tools.DotNet 1.1.0-preview4-final’ uses features that are not supported by the current version of NuGet. To upgrade NuGet, see http://docs.nuget.org/consume/installing-nuget.
When trying to install the package Microsoft.EntityFrameworkCore.Tools.DotNet
via project.json
, the following error is logged to the Output window:
Package Microsoft.EntityFrameworkCore.Tools.DotNet 1.1.0-preview4-final is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Microsoft.EntityFrameworkCore.Tools.DotNet 1.1.0-preview4-final supports: netcoreapp1.0 (.NETCoreApp,Version=v1.0) One or more packages are incompatible with .NETFramework,Version=v4.6.1.
Further technical details
EF Core version: 1.1.0 Operating system: Win10 Visual Studio version: VS 2015 Update 3
Other details about my project setup:
PM> dotnet --version 1.0.0-preview2-1-003177
I have an ASP.NET Core application targeting the full .NET framework. Thus I need the net461
entry in the frameworks
section of project.json
.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:37 (14 by maintainers)
I haven’t been able to use the 1.1.0 version, I had to use:
"Microsoft.EntityFrameworkCore.Design": "1.0.0-preview2-final"
So I have all my entityframework dependencies with 1.1.0 version except the tools and the design dll. That’s the only way I made it work.
After trying alot of combinations, this is what works with my framework:
“dependencies”: { “System.Net.Http”: “4.3.0”, “YeshuApp.Models”: “1.0.0-*”, “Microsoft.NETCore.App”: “1.1.0”, “Microsoft.ApplicationInsights”: “2.2.0”, “Microsoft.EntityFrameworkCore”: “1.1.0”, “Microsoft.EntityFrameworkCore.SqlServer”: “1.1.0”, “Microsoft.EntityFrameworkCore.Relational”: “1.1.0”, “Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore”: “1.1.0”, “Microsoft.EntityFrameworkCore.SqlServer.Design”: “1.1.0”, “Newtonsoft.Json”: “9.0.1”, “Microsoft.EntityFrameworkCore.Tools.DotNet”: “1.0.0-preview3-final”, “Microsoft.EntityFrameworkCore.Design”: “1.0.0-preview2-final”, “Microsoft.EntityFrameworkCore.Tools”: “1.0.0-preview2-final” }, “frameworks”: { “netcoreapp1.1”: { “imports”: [ “dotnet5.6”, “portable-net45+win8” ] } }, “tools”: { “Microsoft.EntityFrameworkCore.Tools”: “1.0.0-preview2-final”, “Microsoft.EntityFrameworkCore.Tools.DotNet”: “1.0.0-preview2-final”, “Microsoft.EntityFrameworkCore.Design”: “1.0.0-preview2-final” },