Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor WASM app leaves untrimmed System.IO.Pipelines assembly by default #27782

Closed
Tracked by #29635
eerhardt opened this issue Nov 12, 2020 · 3 comments
Closed
Tracked by #29635
Labels
affected-all This issue impacts all the customers area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly severity-minor This label is used by an internal tool
Milestone

Comments

@eerhardt
Copy link
Member

Describe the bug

When publishing a default blazorwasm app, System.IO.Pipelines.dll is getting published to the output folder and is not trimmed at all.

The reason this isn't trimmed by default is because System.IO.Pipelines isn't part of the shared fx / runtimepack in .NET Core. And the SDK only trims System assemblies that are in the runtimepack, and not assemblies that come as part of a NuGet package.

We should be marking System.IO.Pipelines.dll as trimmable, so it gets trimmed when it isn't used.

To Reproduce

  1. dotnet new blazorwasm
  2. dotnet publish -c Release
  3. Inspect the published app folder bin\Release\net5.0\publish\wwwroot\_framework\

See that System.IO.Pipelines.dll exists, and it doesn't have any IL trimmed from it.

Further technical details

  • ASP.NET Core version: 5.0
  • Include the output of dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.100
 Commit:    5044b93829

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.100\

Host (useful for support):
  Version: 5.0.0
  Commit:  cf258a14b7

.NET SDKs installed:
  2.1.811 [C:\Program Files\dotnet\sdk]
  5.0.100-rc.1.20420.7 [C:\Program Files\dotnet\sdk]
  5.0.100-rc.2.20479.15 [C:\Program Files\dotnet\sdk]
  5.0.100-rtm.20509.5 [C:\Program Files\dotnet\sdk]
  5.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0-rc.2.20475.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0-rtm.20508.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0-rc.2.20475.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0-rtm.20508.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0-rc.2.20475.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0-rtm.20508.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

cc @pranavkm @SteveSandersonMS

@pranavkm pranavkm added the area-blazor Includes: Blazor, Razor Components label Nov 12, 2020
@pranavkm
Copy link
Contributor

@mkArtakMSFT we might want to consider patching this in 5.0.1. Addressing this issue removes an entire assembly so it's one fewer download, and 20kb (compressed) in download size.

@mkArtakMSFT mkArtakMSFT added the bug This issue describes a behavior which is not expected - a bug. label Nov 12, 2020
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone Nov 12, 2020
@ghost
Copy link

ghost commented Nov 12, 2020

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added affected-very-few This issue impacts very few customers severity-minor This label is used by an internal tool affected-all This issue impacts all the customers feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly and removed affected-very-few This issue impacts very few customers labels Nov 12, 2020
@eerhardt
Copy link
Member Author

@ghost ghost locked as resolved and limited conversation to collaborators Apr 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-all This issue impacts all the customers area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly severity-minor This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests

3 participants