Repository navigation
Description
Description
Migrating the SDK's Blazor WebAssembly integration tests from Mono to CoreCLR exposes a consistent difference in the trimmed managed assembly closure. CoreCLR publishes retain these five assemblies that are absent from the existing Mono-based publish baselines:
System.Collections.Immutable.dllSystem.Diagnostics.StackTrace.dllSystem.IO.Compression.dllSystem.IO.MemoryMappedFiles.dllSystem.Reflection.Metadata.dll
These assemblies are served as their corresponding WebCIL .wasm files. This issue concerns the underlying managed assemblies being retained, not compression or static-asset packaging.
Please investigate what roots these assemblies in the CoreCLR browser configuration and whether those dependencies can be removed so the linker can eliminate them. The CI evidence establishes the assembly-set difference; we have not yet identified the dependency/root chain or established that all five assemblies are unnecessary.
Reproduction and environment
The migration is in dotnet/sdk#56461. The shared test-project setup sets UseMonoRuntime=false for the current target framework.
Publish the SDK test assets BlazorWasmMinimal or BlazorHosted with CoreCLR and trimming enabled, then inspect the linked DLL closure and published WebCIL assembly set:
dotnet publish -c Debug -p:UseMonoRuntime=false -p:PublishTrimmed=true -p:PublishReadyToRun=false -bl:publish.binlogCompare with the equivalent Mono publish. This difference appears on the first publish, without requiring a prior publish or stale intermediate outputs.
Observed environment in SDK build 1619963:
- Application target framework:
net11.0; test runner:net12.0. - CoreCLR runtime pack:
Microsoft.NETCore.App.Runtime.browser-wasm/12.0.0-alpha.1.26473.114. - WebAssembly SDK pack and ILLink tasks:
12.0.0-alpha.1.26473.114. - SDK:
12.0.100-ci. - MSBuild:
18.12.0-1.26473.114+c567e8ff1. - Trimming and WebCIL enabled; ReadyToRun disabled.
CI evidence
The same five additional assemblies are reported by seven distinct publish-manifest tests across Linux, macOS, Windows, and Windows FullFramework (28 failing executions):
BlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_PublishMinimal_WorksBlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_Publish_Hosted_WorksBlazorWasmStaticWebAssetsIntegrationTest.StaticWebAssets_Publish_DoesNotIncludeXmlDocumentationFiles_AsAssetsWasmJsModulesIntegrationTests.Publish_DoesNotGenerateManifestJson_IncludesJSModulesOnBlazorBootJsonManifestWasmJsModulesIntegrationTests.JsModules_CanHaveDifferentBuildAndPublishModulesWasmJsModulesIntegrationTests.JsModules_CanCustomizeBlazorInitializationWasmJsModulesIntegrationTests.JsModules_Hosted_CanCustomizeBlazorInitialization
The publish commands succeed. The tests fail when comparing staticwebassets.publish.json against the Mono-based expectations. Although the first reported mismatch is in compressed representations, those entries represent the additional published managed assemblies listed above. The unexpected set is identical across all seven tests and four CI configurations.
Representative first-publish binlog for StaticWebAssets_PublishMinimal_Works.
Scope
Determine the CoreCLR-specific roots/dependencies retaining the five assemblies and remove unnecessary retention where possible. If any retention is intentional and necessary, document the reason so the SDK publish baselines can be updated knowingly.
This is separate from the repeated-publish assembly-loss bug in #135218, and from the runtime-pack C++ header and intermediate JavaScript source-map filtering changes.
Note
This issue description was generated with the assistance of GitHub Copilot.
Activity
dotnet-policy-service commentedon Oct 5, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.