Rooting serializable types for TrimTestBinaryDeserialization test
There is no reliable way for the trimmer to statically reach types that are needed for resource serialization and deserialization. The current plan is to keep all relevant library types that are serializable to get resources working with trimmed WinForms applications.
The first iteration of this effort is to root all types in runtime and windowsdesktop (with WindowsForms profile) assemblies that are serializable (except compiler generated types that are serializable). Additionally, there are couple of exceptions that are needed to be rooted for this test application to run in a trimmed mode; All of mscorlib assembly is rooted and a couple of additional types in the System.Resources.Extensions assembly (DeserializingResourceReader, RuntimeResourceSet).
Future iterations should look at more simple WinForms applications with custom resources to identify a core set of library types that need to be keep for basic WinForms applications with custom resources to be trimmed.
Microsoft Reviewers: Open in CodeFlow
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.24401%. Comparing base (
4095304) to head (9db6115).
Additional details and impacted files
@@ Coverage Diff @@
## main #11342 +/- ##
===================================================
+ Coverage 74.24289% 74.24401% +0.00112%
===================================================
Files 3022 3022
Lines 626297 626297
Branches 46702 46702
===================================================
+ Hits 464981 464988 +7
+ Misses 157921 157911 -10
- Partials 3395 3398 +3
| Flag | Coverage Δ | |
|---|---|---|
| Debug | 74.24401% <ø> (+0.00112%) |
:arrow_up: |
| integration | 18.26738% <ø> (+0.00210%) |
:arrow_up: |
| production | 46.91646% <ø> (+0.00140%) |
:arrow_up: |
| test | 97.03729% <ø> (+0.00087%) |
:arrow_up: |
| unit | 43.87313% <ø> (+0.02598%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.