1
resposta

erro migration construtor design.OperationExecutor

Estou refazendo o curso de EFCore e está ocorrendo um erro que nunca tinha ocorrido, na hora de add-migration está ocorrendo um erro de: Construtor no tipo Microsoft.EntityFrameworkCore.Design.OperationExecutor' não encontrado.

e não cria a migration, já procurei mas não encotrei nada parecido.

já verifiquei as versão e estão iguais as das vídeo aulas, por favor um help...

PM> add-migration teste System.MissingMethodException: Construtor no tipo 'Microsoft.EntityFrameworkCore.Design.OperationExecutor' n�o encontrado. em System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) em System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) 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) Construtor no tipo 'Microsoft.EntityFrameworkCore.Design.OperationExecutor' n�o encontrado. PM>

1 resposta

Olá Carlos, tudo bem?

Parece que está faltando uns pacotes. Tente instalar os seguintes:

dotnet add package Microsoft.EntityFrameworkCore.Design -v 1.1.0

dotnet add package Microsoft.EntityFrameworkCore.Tools.DotNet -v 1.1.0

Outro comando que pode ser interessante é o dotnet tool install --global dotnet-ef, mas acho que esse último só será necessário depois da versão 3.1 do Entity Framework Core.

No aguardo para saber se os pacotes o ajudaram!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software