0

I'm trying to use the Scaffold-DBContext but it throws me error when i try to run it on the Package Console Manager.
It throws this error:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.EntityFrameworkCore.Design, Culture=neutral, PublicKeyToken=null'. Impossibile trovare il file specificato. File name: 'Microsoft.EntityFrameworkCore.Design, Culture=neutral, PublicKeyToken=null' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks, IntPtr ptrLoadContextBinder) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String contentRootPath, String dataDirectory, String rootNamespace, String environment) at Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor() at Microsoft.EntityFrameworkCore.Tools.Commands.DbContextScaffoldCommand.Execute() at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args) at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)

Basically it says that it cant find the Microsoft.EntityFrameworkCore.Design Assembly.
I already checked and it's installed.
EDIT:
I've installed the following packages via the console:

Install-Package Microsoft.EntityFrameworkCore.SqlServer
Install-Package Microsoft.EntityFrameworkCore.Tools
Install-Package Microsoft.EntityFrameworkCore.SqlServer.Design
Gino
  • 175
  • 3
  • 16
  • Which package do you installed? Can you tell how you install the package? – Will Huang Apr 29 '17 at 13:45
  • I'll edit my question with the packages i've installed – Gino Apr 29 '17 at 19:32
  • I've just found the answer in another post: http://stackoverflow.com/questions/40804083/scaffold-dbcontext-throws-error-could-not-find-assembly-in-net-core – Gino Apr 29 '17 at 19:48

1 Answers1

0

You need to install Microsoft.EntityFrameworkCore.Design

Austin Winstanley
  • 1,339
  • 9
  • 19