Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable reflection-based serialization in System.Net.ServerSentEvents.Tests on Apple mobile #103122

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

Copy link
Contributor

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

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