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

[BUG] Elsa 2 is not compatible with EFC 9 #6265

Open
martinhjulstrom opened this issue Jan 2, 2025 · 1 comment
Open

[BUG] Elsa 2 is not compatible with EFC 9 #6265

martinhjulstrom opened this issue Jan 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@martinhjulstrom
Copy link
Contributor

martinhjulstrom commented Jan 2, 2025

As was reported in # #6115 there is a breaking change in Entity Framework Core 9. If you run Elsa 2 in a project and target .net 9 you will get this exception:


System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<Int32> Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.ExecuteDeleteAsync(System.Linq.IQueryable`1<!!0>, System.Threading.CancellationToken)'.
   at async Task<long> Elsa.EntityFrameworkCore.Common.Store<TDbContext, TEntity>.DeleteWhereAsync(Func<IQueryable<TEntity>, IQueryable<TEntity>> query, CancellationToken cancellationToken)
   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(ref TStateMachine stateMachine)
   at Task<long> Elsa.EntityFrameworkCore.Common.Store<TDbContext, TEntity>.DeleteWhereAsync(Func<IQueryable<TEntity>, IQueryable<TEntity>> query, CancellationToken cancellationToken)
   at async ValueTask<long> Elsa.EntityFrameworkCore.Modules.Runtime.EFCoreWorkflowInboxMessageStore.DeleteManyAsync(WorkflowInboxMessageFilter filter, PageArgs pageArgs, CancellationToken cancellationToken)
   at async Task Elsa.Workflows.Runtime.HostedServices.WorkflowInboxCleanupHostedService.CleanupExpiredMessages(CancellationToken cancellationToken)
   at async Task Elsa.Workflows.Runtime.HostedServices.WorkflowInboxCleanupHostedService.ExecuteAsync(CancellationToken stoppingToken)

I think the solution is to add .net 9 as a target in Elsa 2.x, is that worked being planned or would you be willing to accept PRs with that change?

@martinhjulstrom martinhjulstrom added the bug Something isn't working label Jan 2, 2025
@sfmskywalker
Copy link
Member

Yes, I'd be happy to accept a PR targeting .NET 9 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants