You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Framework SourceType for WASM pass-through assets in multi-client solutions
When multiple Blazor WebAssembly client projects reference the same runtime pack,
pass-through files (JS, maps, ICU data, native wasm) share a NuGet cache path.
This causes duplicate Identity keys in the static web assets pipeline, crashing
DiscoverPrecompressedAssets with an ArgumentException.
Instead of copying pass-throughs to the intermediate output path (which risks staleness
on incremental builds when the runtime pack changes), materialize them to a per-project
obj/fx/{PackageId}/ directory using the Framework SourceType convention from the SWA SDK.
This gives each project a unique Identity while properly modeling the relationship:
these are framework assets adopted by each consuming project.
- Pass-through files: copied to obj/fx/{PackageId}/, registered with SourceType=Framework
- WebCil-converted files: remain in obj/webcil/, registered with SourceType=Computed
- Satellite assemblies: placed in culture subdirectories in both cases
- Both groups get per-item ContentRoot for correct Identity resolution
Requires SDK support for SourceType=Framework (dotnet/sdk#53135).
Fixes duplicate-key crash introduced by #124125.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments