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

Does not work with EF Core 5.0.0 #31

Open
manisto opened this issue Nov 24, 2020 · 1 comment
Open

Does not work with EF Core 5.0.0 #31

manisto opened this issue Nov 24, 2020 · 1 comment

Comments

@manisto
Copy link

manisto commented Nov 24, 2020

I Just updated my project from .NET Core 3.1 to .NET 5.0. While updating, I also updated EF Core packages (3.1.7 -> 5.0.0). After updating, I get the following error:

System.TypeLoadException: Method 'CommitTransactionAsync' in type 'FileContextCore.Storage.Internal.FileContextTransactionManager' from assembly 'FileContextCore, Version=3.4.0.0, Culture=neutral, PublicKeyToken=165cac099da39c78' does not have an implementation.
   at Microsoft.Extensions.DependencyInjection.FileContextServiceCollectionExtensions.AddEntityFrameworkFileContextDatabase(IServiceCollection serviceCollection)
   at FileContextCore.Infrastructure.Internal.FileContextOptionsExtension.ApplyServices(IServiceCollection services)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>g__BuildServiceProvider|3()
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>b__2(Int64 k)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired)
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Internal.IDbContextDependencies.get_EntityFinderFactory()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.get_Finder()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.FindAsync(Object[] keyValues)
   at Recipes.Infrastructure.Repositories.CategoryRepository.GetCategoryAsync(Int32 categoryId) in C:\workspace\private\recipe-printer\Recipes.Infrastructure\Repositories\CategoryRepository.cs:line 25
   at Recipes.Application.Commands.SaveCategoryCommandHandler.HandleAsync(SaveCategoryCommand command) in C:\workspace\private\recipe-printer\Recipes.Application\Commands\SaveCategoryCommandHandler.cs:line 23
   at Recipes.Api.Controllers.CategoriesController.Save(SaveCategoryCommand command) in C:\workspace\private\recipe-printer\Recipes.Api\Controllers\CategoriesController.cs:line 48
   at lambda_method17(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

If I downgrade Microsoft.EntityFrameworkCore.Design to 3.1.7, the error goes away.

@mc0re
Copy link

mc0re commented Jan 29, 2023

.NET 7 / EFCore 7 still manifest this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants