Purpose of the package "Microsoft.EntityFrameworkCore.Design"

All tutorials agree that project.json should include:

 "Microsoft.EntityFrameworkCore.Design": { "type":"build", "version":"1.0.0-preview2-final" } 

I never turned it on and never had a problem.

I turn on only

 "Microsoft.EntityFrameworkCore" "Microsoft.EntityFrameworkCore.Sqlite" (or Sqlserver) "Microsoft.EntityFrameworkCore.Tools" 

What does this package do? Why can I exclude it without problems?


UPDATE: See the comments in the accepted answer to find out which package to import in this scenario.

+5
source share
1 answer

Microsoft.EntityFrameworkCore.Design contains all the development-time logic for the Entity Framework Core. This is code that includes all of the various tools (PMC cmdlets such as Add-Migration , dotnet ef and ef.exe ).

If you are not using Migrations or Reverse Engineering, you do not need it.

And when you need it, we recommend PrivateAssets="All" so that it is not published on the server, where you almost certainly will not need it.

+8
source

Source: https://habr.com/ru/post/1264975/


All Articles