Default Blazor Wasm template managed libraries size reduction #30098
Closed
Description
There is a lot of unnecessary assemblies left in the default Blazor Wasm template after trimming.
The list of assemblies which should be easy to fully eliminate
- System.Collections.Concurrent.dll - It has no use in single threaded environment
- System.Collections.Immutable.dll - It does not seem to be needed at all Remove System.Text.Json's DynamicDependencies on Collections.Immutable runtime#53317
- System.ComponentModel.dll - Single interface method is used from it
- System.Console.dll - Remove dependency on System.Console in default Blazor WASM app #31148
- System.IO.Pipelines Blazor WASM app leaves untrimmed System.IO.Pipelines assembly by default #27782
- System.Linq.dll - It should be possible to remove most if not all use of it
- System.ObjectModel.dll - Change Router _emptyParametersDictionary to a regular Dictionary #31460
- System.Private.Uri.dll - Only System.Uri::.ctor(string) is needed
- System.Runtime.CompilerServices.Unsafe.dll Typeforward System.Runtime.CompilerServices.Unsafe to SPC for netcore runtime#45475
- System.Text.Encodings.Web.dll - Single use to create JsonEncodedText from hardcoded string constant
- Microsoft.Extensions.Logging.Abstractions.dll Add option to disable logging in sample Blazor app #27721
- Microsoft.Extensions.Logging.dll Add option to disable logging in sample Blazor app #27721
Cleaning this up could reduce the trimmed output for managed libraries for the default template by ~15%
Metadata
Assignees
Labels
This issue has been fixedThis issue impacts most of the customersIncludes: Blazor, Razor ComponentsThis issue represents an ask for new feature or an enhancement to an existing oneThis issue is related to linking in BlazorThis issue is related to and / or impacts Blazor WebAssemblyThis label is used by an internal tool