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
System.InvalidCastException: Unable to cast object of type 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.MySqlDesignTimeServices' to type 'Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices'.
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureDesignTimeServices(Type designTimeServicesType, IServiceCollection services)
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.Build(String provider)
at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContextAsync(String provider, String connectionString, String outputDir, String dbContextClassName, IEnumerable1 schemas, IEnumerable1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.d__22.MoveNext()
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source, Int32& length) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass4_0`1.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Unable to cast object of type 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.MySqlDesignTimeServices' to type 'Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices'.
Can anyone help on this
The text was updated successfully, but these errors were encountered:
When i run:
dotnet ef dbcontext scaffold "Host=xxx.xxx.xxx.xxx;Port=3307;Database=xxxxxxxx;Username=xxxxx;Password=xxxxxxxxx" ^ Pomelo.EntityFrameworkCore.MySql ^ --force ^ --context "FooContext" ^ --output-dir "Entities" ^ --verbose
Get this error
System.InvalidCastException: Unable to cast object of type 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.MySqlDesignTimeServices' to type 'Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices'.
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureDesignTimeServices(Type designTimeServicesType, IServiceCollection services)
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.Build(String provider)
at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContextAsync(String provider, String connectionString, String outputDir, String dbContextClassName, IEnumerable
1 schemas, IEnumerable
1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, CancellationToken cancellationToken)at Microsoft.EntityFrameworkCore.Design.OperationExecutor.d__22.MoveNext()
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable
1 source, Int32& length) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable
1 source)at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass4_0`1.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Unable to cast object of type 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.MySqlDesignTimeServices' to type 'Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices'.
Can anyone help on this
The text was updated successfully, but these errors were encountered: