-
Notifications
You must be signed in to change notification settings - Fork 44
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
Datamodel gives System.InvalidProgramException: Common Language Runtime detected an invalid program. #56
Comments
Hi @JoschaMetze , hm, this is strange. Yeah, this kind of errors are very hard to debug, but I'm very surprised this happened. May I know what versions of .Net, EF and Npgsql you are using? How many properties in your model class? Is it big? You suspect it is related to nullable properties? I could try to do some investigations on my side. |
Hi, we are using ef core 3.1.6 in a netcoreapp 3.1. I've tried Npgsql 0.9.0 and 0.8.4 (as well as compiling from source). |
Hi ! I've got the same problem, I went from 0.7.7.1 To 0.8.x and that error start. Thanks ! |
Hi! I've got the same problem when used "InsertAsync". InvalidProgramException: Common Language Runtime detected an invalid program.\r\nSTACK TRACE: at ConsumerEntity_c8b586f0_1415_4179_9b7b_9eaf5f88749c_59.WriterForInsertAction(ConsumerEntity , NpgsqlBinaryImporter , DbContext )\r\n at Npgsql.Bulk.NpgsqlBulkUploader.WriteInsertPortion[T](IEnumerable |
Hi, we have got the same problem using efcore 5.0.4 and npgsql 0.9.0.
We tried using npgsql The complex object use these types.
Hope this is helpful, Cheers, |
@neisbut Hi, any progress? |
Hi,
I tried bulk updater in a complex datamodel. Unfortunately it fails in the generated WriterForInsertAction with a InvalidProgramException.
I tried to isolate the problem but have not been very successfull yet. It seems to be the problem when I want to insert an entity that might be linked in another entity.
Is there a way to debug this somehow? I tried to work around this a little bit, it seems to be related to the nullable-Path (underlying!=null). But my IL-Skills are not the best unfortunately. I was not able to create a repro case that I might be able to share.
Any ideas? The InvalidProgramException doesn't give more details.
Entity_a494b9d3_73cd_46c9_bb15_dc181ae254c8_1.WriterForInsertAction(Messlokation , NpgsqlBinaryImporter , OperationContext )
NpgsqlBulkUploader.WriteInsertPortion[T](IEnumerable
1 list, EntityInfo mapping, NpgsqlConnection conn, String tempTableName, NpgsqlBulkCodeBuilder
1 codeBuilder) Zeile 343NpgsqlBulkUploader.Insert[T](IEnumerable
1 entities, InsertConflictAction onConflict) Zeile 281 NpgsqlBulkUploader.Insert[T](IEnumerable
1 entities) Zeile 218Cheers,
Joscha
The text was updated successfully, but these errors were encountered: