Skip to content

Disable JsonSerializer.IsReflectionEnabledByDefault on PublishTrimmed=true #84378

Closed
dotnet/sdk
#33757
@eiriktsarpalis

Description

@eiriktsarpalis

Have we decided we want this to be defaulted to off only when PublishAot=true? Or do we think we should go as far as turning it off by default when PublishTrimmed=true?

For the ASP.NET feature switch, we had it for both. But I'm a little concerned about making the switch for PublishTrimmed at the bottom of the stack. It is a breaking change. If we do this, we will need to update Maui and Blazor WASM SDKs to turn it back on.

We don't need to block this PR on the decision. For ASP.NET, we can just switch our SDK to change EnsureAspNetCoreJsonTrimmability => JsonSerializerIsReflectionEnabledByDefault once this is merged, and can react as changes happen.

Originally posted by @eerhardt in #83844 (comment)

Metadata

Metadata

Labels

area-System.Text.Jsonblocking-releasebreaking-changeIssue or PR that represents a breaking API or functional change over a prerelease.needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnetpartner-impactThis issue impacts a partner who needs to be kept updated

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions