Skip to content

Conversation

@kotlarmilos
Copy link
Member

Description

This PR enables reflection-based serialization in System.Net.ServerSentEvents.Tests which should resolve trimming-related errors on Apple mobile platforms. The tests report the following exception:

Exception messages: System.InvalidOperationException : Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.   Exception stack traces:    at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer()
[06:00:34.9598940]    at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions , Type )
[06:00:34.9599000]    at System.Text.Json.JsonSerializer.GetTypeInfo[JsonElement](JsonSerializerOptions )

Changes

The JsonSerializerIsReflectionEnabledByDefault feature switch is turned off automatically when PublishTrimmed property is set.

Validation

The tests should pass in the ioslike pipeline https://dev.azure.com/dnceng-public/public/_build?definitionId=225&_a=summary.

@kotlarmilos kotlarmilos added this to the 9.0.0 milestone Jun 6, 2024
@kotlarmilos kotlarmilos self-assigned this Jun 6, 2024
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @directhex, @matouskozak
See info in area-owners.md if you want to be subscribed.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

Resolved in #103126.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant