Skip to content

Commit

Permalink
Fix AOT trimming warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rabuckley committed Dec 1, 2024
1 parent 3824ab7 commit e3cd060
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/OidcClient/Infrastructure/LogSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public static class LogSerializer
WriteIndented = true
};

#if NET7_0_OR_GREATER
[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "<Pending>")]
#endif
static LogSerializer()
{
JsonOptions.Converters.Add(new JsonStringEnumConverter());
Expand All @@ -39,7 +42,10 @@ static LogSerializer()
/// <param name="logObject">The object.</param>
/// <returns></returns>
#if NET6_0_OR_GREATER
[RequiresUnreferencedCode("The log serializer uses reflection in a way that is incompatible with trimming")]
[RequiresUnreferencedCode("The log serializer uses reflection in a way that is incompatible with trimming")]
#endif
#if NET7_0_OR_GREATER
[RequiresDynamicCode("The log serializer uses reflection in a way that is incompatible with trimming")]
#endif
public static string Serialize(object logObject)
{
Expand Down

0 comments on commit e3cd060

Please sign in to comment.