Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a custom ILLink pipeline for trimming reference assemblies embedded in the MTGOSDK assembly. We leverage the ILLink MSBuild task to add a post-build target that trims these assemblies before ILRepack runs. This reduces the assembly size from 14.14 MB to 3.88 MB (~72.6%), and the total package size from 2.85 MB to 1.38 MB (~51.6%).
As this library leverages type proxying with the ProxyType and DLRWrapper classes, most API type usage can properly be detected and trimmed by ILLink. Some internal usage of type unbindings w/ DLRWrapper will need to be handled in a custom preserve list. However, this is a relatively small task despite being a reflection-heavy library.