-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Reverse enginnering scaffolding command fails for EF Core 3 Preview 4 #15502
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using EF Core 3 Preview 4 inside an ASP.NET Core 3 Preview 4 application.
dotnet tool install --global dotnet-ef --version 3.0.0-preview4.19216.3
All are
version 3.0.0-preview4.19216.3
Version = 3.0.0-preview4.19216.3
dotnet ef dbcontext scaffold "Server=.;Database=MyDb;Integrated Security=true;" Microsoft.EntityFrameworkCore.SqlServer -o Data -c MyDbContext -t MyTable1 -t MyTable2
I get this error :
System.InvalidCastException: Unable to cast object of type 'Microsoft.EntityFram
eworkCore.Diagnostics.RelationalLoggingDefinitions' to type 'Microsoft.EntityFra
meworkCore.SqlServer.Diagnostics.Internal.SqlServerLoggingDefinitions'.
at Microsoft.EntityFrameworkCore.SqlServer.Internal.SqlServerResources.LogFou
ndDefaultSchema(IDiagnosticsLogger logger)
at Microsoft.EntityFrameworkCore.SqlServer.Internal.SqlServerLoggerExtensions
.DefaultSchemaFound(IDiagnosticsLogger
1 diagnostics, String schemaName) at Microsoft.EntityFrameworkCore.SqlServer.Scaffolding.Internal.SqlServerData baseModelFactory.GetDefaultSchema(DbConnection connection) at Microsoft.EntityFrameworkCore.SqlServer.Scaffolding.Internal.SqlServerData baseModelFactory.Create(DbConnection connection, DatabaseModelFactoryOptions opt ions) at Microsoft.EntityFrameworkCore.SqlServer.Scaffolding.Internal.SqlServerData baseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions opt ions) at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineerScaffold er.ScaffoldModel(String connectionString, DatabaseModelFactoryOptions options, S tring rootNamespace, String modelNamespace, String contextNamespace, String lang uage, String contextDir, String contextName, ModelReverseEngineerOptions modelOp tions, ModelCodeGenerationOptions codeOptions) at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldC ontext(String provider, String connectionString, String outputDir, String output ContextDir, String dbContextClassName, IEnumerable
1 schemas, IEnumerable1 tabl es, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames ) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl (String provider, String connectionString, String outputDir, String outputDbCont extDir, String dbContextClassName, IEnumerable
1 schemaFilters, IEnumerable1 ta bleFilters, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatab aseNames) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c __DisplayClass0_1.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__ DisplayClass3_0
1.b__0()at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execu
te(Action action)
Unable to cast object of type 'Microsoft.EntityFrameworkCore.Diagnostics.Relatio
nalLoggingDefinitions' to type 'Microsoft.EntityFrameworkCore.SqlServer.Diagnost
ics.Internal.SqlServerLoggingDefinitions'.
What might be the problem ??
Thank you.
The text was updated successfully, but these errors were encountered: