JonPSmith / AuthPermissions.AspNetCore

This library provides extra authorization and multi-tenant features to an ASP.NET Core application.

Home Page:https://www.thereformedprogrammer.net/finally-a-library-that-improves-role-authorization-in-asp-net-core/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Startup failing with EF Core 7

pwojee opened this issue · comments

I have EF Core 7 referenced in my project and it seems that AuthP is breaking with this new version.

fail: AuthPermissions.AspNetCore.StartupServices.StartupServiceMigrateAuthPDatabase[0]
An error occurred while creating/migrating the SQL database.
System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder1<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateIndexOperation> Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder.CreateIndex(System.String, System.String, System.String, System.String, Boolean, System.String)'. at AuthPermissions.DataLayer.Migrations.Initial.Up(MigrationBuilder migrationBuilder) at Microsoft.EntityFrameworkCore.Migrations.Migration.BuildOperations(Action1 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.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
at AuthPermissions.AspNetCore.StartupServices.StartupServiceMigrateAuthPDatabase.ApplyYourChangeAsync(IServiceProvider scopedServices)

It works by downgrading to EF Core 6.

Yes, I haven't updated AuthP to .NET 7 yet. I had to updated other libraries I need to .NET 7 first. I will update soon, but it is very big job.

I'll let you know when I have updated it.

I have just released version 4.0.0 that supports .NET 6 and .NET 7.

Thank you!