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

Update complex type trimming remarks #34654

Open
guardrex opened this issue Feb 6, 2025 · 1 comment
Open

Update complex type trimming remarks #34654

guardrex opened this issue Feb 6, 2025 · 1 comment

Comments

@guardrex
Copy link
Collaborator

guardrex commented Feb 6, 2025

Description

To resolve #31422, language was added to two articles to cover how some complex types might be trimmed away.

In the Trimmer article ...

Trimming may have detrimental effects for the published app. In apps that use [reflection](/dotnet/csharp/advanced-topics/reflection-and-attributes/), the IL Trimmer often can't determine the required types for runtime reflection and trim them away. For example, complex framework types for JS interop, such as <xref:System.Collections.Generic.KeyValuePair>, might be trimmed by default and not available at runtime for JS interop calls. In these cases, we recommend creating your own custom types instead.

In the JS interop overview article ...

Complex framework types, such as <xref:System.Collections.Generic.KeyValuePair>, might be [trimmed away by the IL Trimmer on publish](xref:blazor/host-and-deploy/configure-trimmer) and not present for JS interop. We recommend creating custom types for types that the IL Trimmer trims away by default.

@maraf and @lewing ... Two questions ...

  1. Is there a complex type that I can swap in for KeyValuePair that would still be trimmed away?

  2. [release/8.0-staging][wasm] remove problematic default settings runtime#112216 is for release 8.0+, correct?

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/configure-trimmer?view=aspnetcore-9.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/configure-trimmer.md

Document ID

1487b5e7-a40c-d757-c530-d0e4017f189e

Article author

@guardrex

Metadata

  • ID: 2203b81b-1b37-8599-eb50-f6284170d224
  • Service: aspnet-core
  • Sub-service: blazor

Related Issues

Copy link
Contributor

github-actions bot commented Feb 6, 2025

🌱🐇 Spring is coming. Hang in there! I'm pull'in for ya! 🐣🌻

Stand-by! ... A green dinosaur 🦖 will be along shortly to assist.

@github-actions github-actions bot added the Blazor label Feb 6, 2025
@guardrex guardrex added Pri1 doc-enhancement and removed Source - Docs.ms Docs Customer feedback via GitHub Issue labels Feb 6, 2025
@guardrex guardrex moved this from Triage to On Hold in Blazor.Docs Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: On Hold
Development

No branches or pull requests

1 participant