You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mention IDbContextFactory in error when migrations can't create context. #4832
We should point folks toward IDbContextFactory, currently we just fail with the exception from Activator
PM> Add-Migration InitialSchema
System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.EntityFrameworkCore.Design.DbContextOperations.<>c__DisplayClass10_3.<FindContextTypes>b__13()
at Microsoft.EntityFrameworkCore.Design.DbContextOperations.CreateContext(Func`1 factory)
at Microsoft.EntityFrameworkCore.Design.DbContextOperations.CreateContext(String contextType)
at Microsoft.EntityFrameworkCore.Design.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.<AddMigrationImpl>d__7.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass4_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
No parameterless constructor defined for this object.
changed the title [-]Mention IDbCotnextFactory when migrations can't create context.[/-][+]Mention IDbContextFactory in error when migrations can't create context.[/+]on Mar 17, 2016
Activity
[-]Mention IDbCotnextFactory when migrations can't create context.[/-][+]Mention IDbContextFactory in error when migrations can't create context.[/+]Fix #4832 - Mention IDbContextFactory when tools cannot create a context
Fix #4832 - Mention IDbContextFactory when tools cannot create a context
Fix #4832 - Mention IDbContextFactory when tools cannot create a context