Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run Enable-Migrations #5

Open
kashif-khan opened this issue May 6, 2022 · 1 comment
Open

Unable to run Enable-Migrations #5

kashif-khan opened this issue May 6, 2022 · 1 comment

Comments

@kashif-khan
Copy link

I am unable to run Enable-Migrations on with this demo code. All the packages are restored and there is no modification to the code. I am getting below exception when running.

PM> Enable-Migrations
System.ArgumentNullException: Value cannot be null.
Parameter name: type
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(Project project)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project)
   at System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory)
   at System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String contextTypeName)
   at System.Data.Entity.Migrations.EnableMigrationsCommand.<>c__DisplayClass2.<.ctor>b__0()
   at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Value cannot be null.
Parameter name: type

image

@AjayDevCL
Copy link

I am unable to run Enable-Migrations on with this demo code. All the packages are restored and there is no modification to the code. I am getting below exception when running.

PM> Enable-Migrations
System.ArgumentNullException: Value cannot be null.
Parameter name: type
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(Project project)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project)
   at System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory)
   at System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String contextTypeName)
   at System.Data.Entity.Migrations.EnableMigrationsCommand.<>c__DisplayClass2.<.ctor>b__0()
   at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Value cannot be null.
Parameter name: type

image

Try Updating EntityFrameworkCore Version and check again..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants