Purpose of package "Microsoft.EntityFrameworkCore.Design"

.net-core asp.net-core c# entity-framework-core

Question

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.

1
22
3/19/2019 9:58:40 AM

Accepted Answer

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.

24
1/15/2018 7:20:05 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow