kalten
Support generic method NativeAOT JsonTypedInfo all together
Hello, I'm in the process of rewriting some of my libs to support native aot.
But I have one use case for which I don't know how to do it.
My use case look like this:
The issue is that
JsonSerializer.Deserialize
need either a JsonTypeInfo
or a JsonSerializerOptions
with TypeInfoResolver
property set, to be working in NativeAot mode.
But I don't know how to change IMyService
without having to ask the user to provide two JsonTypeInfo
parameters (One for ModelA<CustomData>
and one for ModelB<CustiomData>
)
And using a JsonSerializerOptions
would make the api less intuitive.
Is there a way to JsonSourceGen only ModelA<>
and ModelB<>
in the lib and le the user provide the the T
part?
Any advice is welcome.3 replies
JumpList PublishAOT
Hello, I'm creating an Avalonia app and it support PublishAOT build
I would like to add JumpList support to it but I'm not able to make it work after the AOT build.
I tried to use Vanara (https://github.com/dahall/Vanara/) but it stop working as soon as set PublishAOT=true with an InvalidProgramException.
I also tried to use CsWin32 (https://github.com/microsoft/CsWin32/discussions) hoping to have a more modern com support. But I don't have the knowledge to use this low level api.
I tried Avalonia.Win32.JumpLists nuget package too without much more success.
Any idea on how to make it work?
140 replies