Skip to content

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Jul 2, 2020

Allow the unused ServiceProviderEngine strategy types to be trimmed by the ILLinker by removing the ServiceProviderMode enum and only have the "default" behavior in the product. The ServiceProviderMode enum is only used for testing, so move it to the tests.

Fix #38678

This allows for System.Linq.Expressions to be completely removed in a default Blazor application. It also removes one of two usages of System.Reflection.Emit (the other being #38693).

With this change, the IL size of a Blazor WASM default template application:

Build Size
master 3,366,912 bytes
PR 3,039,232 bytes

Allow the unused ServiceProviderEngine strategy types to be trimmed by the ILLinker.

Fix dotnet#38678
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@eerhardt eerhardt force-pushed the DependencyInjectionTrimmable branch from 631a92e to faaee83 Compare July 3, 2020 12:45
@eerhardt eerhardt merged commit 2014fb5 into dotnet:master Jul 3, 2020
@eerhardt eerhardt deleted the DependencyInjectionTrimmable branch July 3, 2020 15:28
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make DependencyInjection more linker trimmable

4 participants