Open Closed

EF Core Migrations Crash on macOS (Apple Silicon) with ABP v9 + Devart Oracle #10303


User avatar
0
mogau.mokgabudi created

I’m experiencing a critical issue when running EF Core migrations on macOS (Apple Silicon) using ABP v9 with the Devart Oracle provider.

I recently upgraded from .NET 8 to .NET 9 and was able to run migrations without issue prior to the upgrade. Migrations targeting SQL Server are not affected — the issue appears specific to Oracle (Devart) on macOS.

I’d appreciate guidance on whether this is a known limitation or if there is a recommended configuration.

  • Exception message and full stack trace: Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Runtime.InteropServices.Marshal.WriteInt32(IntPtr, Int32, Int32) at CeFcm4kuMpCvdFmV8C.uTJxbl9WRAXV6jfcAd.JipZQKrCeCqytYrGNyd(IntPtr, Int32) at CeFcm4kuMpCvdFmV8C.uTJxbl9WRAXV6jfcAd.K9otpUdIVy() at <Module>..cctor() at update.EntityFrameworkCore.updateDbContextFactory.CreateDbContext(System.String[]) at System.RuntimeMethodHandle.InvokeMethod(System.Object, Void**, System.Signature, Boolean) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(System.Object, System.Span1<System.Object>, System.Reflection.BindingFlags) at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContextFromFactory(System.Type, System.Type) at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations+<>c__DisplayClass29_0.<FindContextFactory>b__0() at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(System.String, System.Collections.Generic.KeyValuePair2<System.Type,System.Func1<Microsoft.EntityFrameworkCore.DbContext>>) at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(System.String) at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(System.String, System.String, System.String, System.String, Boolean) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(System.String, System.String, System.String, System.String, Boolean) at Microsoft.EntityFrameworkCore.Design.OperationExecutor+AddMigration+<>c__DisplayClass0_0.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor+OperationBase+<>c__DisplayClass3_01[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<Execute>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor+OperationBase.Execute(System.Action) at Microsoft.EntityFrameworkCore.Design.OperationExecutor+OperationBase.Execute[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Func1<System.__Canon>) at Microsoft.EntityFrameworkCore.Design.OperationExecutor+AddMigration..ctor(Microsoft.EntityFrameworkCore.Design.OperationExecutor, Microsoft.EntityFrameworkCore.Design.IOperationResultHandler, System.Collections.IDictionary) at System.RuntimeMethodHandle.InvokeMethod(System.Object, Void**, System.Signature, Boolean) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(System.Object, System.Span1<System.Object>, System.Reflection.BindingFlags) at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at System.Reflection.RuntimeConstructorInfo.Invoke(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor.Execute(System.String, System.Object, System.Collections.IDictionary) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Runtime.CompilerServices.CallSite, System.__Canon, System.__Canon, System.__Canon, System.__Canon) at Microsoft.EntityFrameworkCore.Tools.OperationExecutorBase.InvokeOperationImpl(System.String, System.Collections.IDictionary) at Microsoft.EntityFrameworkCore.Tools.OperationExecutorBase.InvokeOperation[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String, System.Collections.IDictionary) at Microsoft.EntityFrameworkCore.Tools.OperationExecutorBase.AddMigration(System.String, System.String, System.String, System.String) at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute(System.String[]) at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase+<>c__DisplayClass0_0.<Configure>b__0(System.String[]) at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(System.String[]) at Microsoft.EntityFrameworkCore.Tools.Program.Main(System.String[])

  • Steps to reproduce the issue:

  1. Create a new ABP solution: abp new update -u angular -dbms Oracle-Devart --version 9.3.7

  2. Run initial migrations in the aspnet-core project dotnet ef migrations add Initial \ --project src/update.EntityFrameworkCore/update.EntityFrameworkCore.csproj \ --startup-project src/update.DbMigrator/update.DbMigrator.csproj \ --context update.EntityFrameworkCore.updateDbContext \ --configuration Debug \ --verbose \ --output-dir Migrations


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share your test project? liming.ma@volosoft.com

    Thanks.

  • User Avatar
    0
    mogau.mokgabudi created

    Hi sure, please use the following link DELETED. Also run the docker compose file in the migrator for a test database

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. I will check it.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I got a 'The license key is missing error

    dotnet ef migrations add Initial Build started... Build succeeded. Unable to create a 'DbContext' of type 'updateDbContext'. The exception 'The license key is missing or not set up correctly. See the Licensing article in the product documentation for details.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

  • User Avatar
    0
    mogau.mokgabudi created

    That fixes it, overriding the implicit dependency pulled in by abp. Thanks a lot, works on net9.0 target as well

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    👍 great!

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 09, 2026, 07:22
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.