Incompatibility with net6 project + EFCore 7
See original GitHub issueI wonder why packages for EF7 are bound to net7 in Elsa since its quite legit to use EF7 with net6. With the configuration net6+EF7, Elsa throws a MethodNotFound exception when trying to apply migrations.
System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder`1<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder.CreateIndex(System.String, System.String, System.String, System.String, Boolean, System.String)'.
at Elsa.Persistence.EntityFramework.SqlServer.Migrations.Initial.Up(MigrationBuilder migrationBuilder)
at Microsoft.EntityFrameworkCore.Migrations.Migration.BuildOperations(Action`1 buildAction)
at Microsoft.EntityFrameworkCore.Migrations.Migration.get_UpOperations()
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.GenerateUpSql(Migration migration, MigrationsSqlGenerationOptions options)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.<>c__DisplayClass16_2.<GetMigrationCommandLists>b__2()
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
at Elsa.Persistence.EntityFramework.Core.StartupTasks.RunMigrations.ExecuteAsync(CancellationToken cancellationToken)
at Elsa.Persistence.EntityFramework.Core.StartupTasks.RunMigrations.ExecuteAsync(CancellationToken cancellationToken)
at Elsa.Runtime.StartupRunner.StartupAsync(CancellationToken cancellationToken)
at Elsa.Runtime.StartupRunner.StartupAsync(CancellationToken cancellationToken)
at Elsa.HostedServices.StartupRunnerHostedService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
Issue Analytics
- State:
- Created 6 months ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Package Microsoft.EntityFramework.Core 6.0.0 is not ...
my problem was that I use net 5 and it tried to install the latest version of entity framework so the solution was...
Read more >Migrate from ASP.NET Core 6.0 to 7.0
NET 7 version of the .NET WebAssembly build tools are incompatible with existing projects built with .NET 6. Projects using the .NET WebAssembly ......
Read more >Microsoft Details Entity Framework Core 7 Plan, EF6 to EF ...
NET, unveiling a plan for Entity Framework Core 7, ... NET Framework-compatible EF versions, actually supporting EF Core as well as .
Read more >EF Core 6.0.0 Preview-6 no longer compatible with .NET 5.
File a bug Trying to update the EF Core packages to Preview-6 results in the following: Checking compatibility for Microsoft.
Read more >XAF and .NET / EF Core supported versions
Hi,. This new .NET versions have me all confused (especially compatibility between them), so sorry if I am asking dumb questions.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like it, I think we should do it. @mohdali is gonna give it a go. Thanks for the suggestions!
I’d rather avoid use of EF and NET in sync since net6 is LTS and net7 is not.
Probably, it could be nice to extract the migrations into a separate package, so people could use the one they need or even allow devs to include the migrations inside their own app as it’s done in https://github.com/appany/AppAny.Quartz.EntityFrameworkCore.Migrations.