You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/blazor/host-and-deploy/configure-trimmer.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,20 +83,20 @@ Consider the following example that performs JSON deserialization into a <xref:S
83
83
84
84
The preceding component executes normally when the app is run locally and produces the following rendered list:
85
85
86
-
> • 1:T1, 1:T2
86
+
> • 1:T1, 1:T2
87
87
> • 2:T2, 2:T2
88
88
89
89
When the app is published, <xref:System.Tuple%602> is trimmed from the app, even in spite of setting the `<PublishTrimmed>` property to `false` in the project file. Accessing the component throws the following exception:
To address lost types, consider adopting one of the following approaches.
96
96
97
97
### Custom types
98
98
99
-
Custom types aren't trimmed by Blazor when an app is published, so we recommend using custom types for JS interop, JSON serialization/deserialization, and other operations that rely on reflection.
99
+
Custom types aren't trimmed by Blazor when an app is published (unless explicitly opted in), so we recommend using custom types for JS interop, JSON serialization/deserialization, and other operations that rely on reflection.
100
100
101
101
The following modifications create a `StringTuple` type for use by the component.
102
102
@@ -123,7 +123,7 @@ The component is modified to use the `StringTuple` type:
Because custom types are never trimmed by Blazor when an app is published, the component works as designed after the app is published.
126
+
Because custom types aren't trimmed by Blazor when an app is published (unless explicitly opted in), the component works as designed after the app is published.
0 commit comments