The CoreRT compiler fails with a StackOverflowException
See original GitHub issueFrom dotnet/corert#6372 by @frankzye.
I came an error:
Unhandled Exception: System.InvalidOperationException: A suitable constructor for type ‘Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategyFactory’ could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
So I added the following lines to RD.xml:
<Assembly Name="Npgsql.EntityFrameworkCore.PostgreSQL">
<Type Name="Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategyFactory" Dynamic="Required All"/>
</Assembly>
But when I compile, it throw an error “Process is terminating due to StackOverflowException”, microsoft.dotnet.ilcompiler\1.0.0-alpha-26919-01\build\Microsoft.NETCore.Native.targets(200,5): error MSB3073 xxx runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-26919-01\tools\ilc" @"obj\release\netcoreapp2.1\win-x64\native\DataExplorer.ilc.rsp exit.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (11 by maintainers)
Top Results From Across the Web
The CoreRT compiler fails with a StackOverflowException
From dotnet/corert#6372 by @frankzye. I came an error: Unhandled Exception: System.InvalidOperationException: A suitable constructor for type 'Npgsql.
Read more >StackOverflowException on build in VS2017/2019
I have a test project that built successfully in VS2015, but the build fails due to a StackOverflowException when I attempt to build...
Read more >Weirdest way to produce a stack overflow [closed]
It actually fails with a StackOverflowError. The exception in the constructor is just a red herring. This is what the book has to...
Read more >Debugging StackOverflow errors
A StackOverflowException is thrown when the execution stack overflows because it contains too many nested method calls.
Read more >StackOverflowException Class (System)
The exception that is thrown when the execution stack exceeds the stack size. This class cannot be inherited.
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
So it seems like whatever is triggering this is happening within
Database.Migrate()
. But commenting out that line reveals a whole sequence of additional EF Core metadata issues.Thankfully, it looks like some serious legwork has been done in dotnet/corert#6477 by @rubin55 and @MichalStrehovsky to document these issues. I’m working my way though those now before debugging the issue in the migrations code.
@rubin55 got EF core working in dotnet/corert#6477. It’s about finding all the places where EF uses reflection.