Skip to content

Deprecate non-generic AddStartupDiagnosticsSection and Add methods in favor of AOT-safe generic overloads #7883

Description

@danielmarbach

The non-generic overloads AddStartupDiagnosticsSection(this IReadOnlySettings, string, object) and StartupDiagnosticEntries.Add(string, object) use reflection-based serialization via JsonSerializer.Serialize(object, JsonSerializerOptions), which is not compatible with trimming or NativeAOT.

Generic overloads AddStartupDiagnosticsSection<T>(IReadOnlySettings, string, T, JsonTypeInfo<T>) and StartupDiagnosticEntries.Add<T>(string, T, JsonTypeInfo<T>) were added in #7882 to provide an AOT-safe path using source-generated JsonSerializerContext.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions