All tutorials agree that project.json
should include:
"Microsoft.EntityFrameworkCore.Design":
{
"type":"build",
"version":"1.0.0-preview2-final"
}
I have never included it, and have never had a problem.
I only include
"Microsoft.EntityFrameworkCore"
"Microsoft.EntityFrameworkCore.Sqlite" (or Sqlserver)
"Microsoft.EntityFrameworkCore.Tools"
What does this package do? Why can I exclude it without problems?
UPDATE: see comments in accepted answer to figure out which package to import in which scenario.
Microsoft.EntityFrameworkCore.Design
contains all the design-time logic for Entity Framework Core. It's the code that all of the various tools (PMC cmdlets like Add-Migration
, dotnet ef
& ef.exe
) call into.
If you don't use Migrations or Reverse Engineering, you don't need it.
And when you do need it, we encourage PrivateAssets="All"
so it doesn't get published to the server where you almost certainly won't need it.