Entity Code First Migrations can not find Microsoft.EntityFrameworkCore.Design

0
Hello, I'm working on a dotnet 4.5.1 project using EntityFramework with CodeFirst Migrations, I've added 1 new field to an entity and I'm trying to add a new migration, however the following error message appears:

N�o foi poss�vel carregar arquivo ou assembly 'Microsoft.EntityFrameworkCore.Design' ou uma de suas depend�ncias. O sistema n�o pode encontrar o arquivo especificado

The command I used was this one:

Add-Migration AddPaymentDataToQuote -project [nome do meu projeto]

I have tried to reinstall the package, rebuild the solution, but without success.

This is the complete message after running the above command

Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFramework\Add-Migration' for Entity Framework 6.
System.IO.FileNotFoundException: N�o foi poss�vel carregar arquivo ou assembly 'Microsoft.EntityFrameworkCore.Design' ou uma de suas depend�ncias. O sistema n�o pode encontrar o arquivo especificado.
Nome do arquivo: 'Microsoft.EntityFrameworkCore.Design'
   em System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   em System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   em System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   em System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   em System.AppDomain.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   em System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   em System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   em Microsoft.EntityFrameworkCore.Tools.AppDomainOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String contentRootPath, String dataDirectory, String rootNamespace, String environment)
   em Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor()
   em Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute()
   em Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
   em Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)

AVI: o log de associa��es de assembly est� desativado.
Para ativar o log de  falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observa��o: h� alguma penalidade para o desempenho associada ao log de falha de associa��o de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].
    
asked by anonymous 14.02.2018 / 13:49

0 answers