-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I have a simple net9 win x64 console app with Dapper and DapperAOT that uses QueryMultipleAsync
. After publishing and running the aot compiled exe, I get the following error:
Unhandled exception: System.PlatformNotSupportedException: Dynamic code generation is not supported on this platform.
at System.Reflection.Emit.ReflectionEmitThrower.ThrowPlatformNotSupportedException() + 0x2b
at Dapper.SqlMapper.CreateParamInfoGenerator(SqlMapper.Identity, Boolean, Boolean, IList`1) + 0xf5
at Dapper.SqlMapper.GetCacheInfo(SqlMapper.Identity, Object, Boolean) + 0x11b
at Dapper.SqlMapper.<QueryMultipleAsync>d__57.MoveNext() + 0xf0
After trying several things, I just noticed that the analyzer reported that this method is not supported by Dapper.AOT.
I'm not familiar with how source generators work to know how complex would that be. How complex would it be to add support for this method? Using QueryMultipleAsync
helps a lot when retrieving large amounts of data.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request