Skip to content

Exception when compiling for NativeAOT #1

@kurtcodemander

Description

@kurtcodemander

This library doesn't work when used in an application which is compiled for NativeAOT (.net 7):

using var client = await AcmeClient.CreateAcmeClientAsync(AcmeClient.LETS_ENCRYPT_PRODUCTION_URL);

gives exception:

System.Text.Json.Serialization.Converters.SmallObjectWithParameterizedConstructorConverter5[<>f__AnonymousType52[System.String[], System.Boolean], System.String[], System.Boolean, System.Object, System.Object]' is missing native code or metadata. This can happen for code that is not compatible with trimming or AOT. Inspect and fix trimming and AOT related warnings that were generated when the app was published. For more information see https://aka.ms/nativeaot-compatibility

It probably needs to be refactored with System.Text.Json source generators for that to work. Big task?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions