Skip to content

Commit c55f263

Browse files
author
Mirroring
committed
Merge commit '85de95211b9e0d72325c8dbfcbfe98a0bb78a2f8'
2 parents c9309e4 + 85de952 commit c55f263

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/mono/wasm/build/WasmApp.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
<!-- Use a unique property, so the already run wasm targets can also run -->
208208
<MSBuild Projects="$(MSBuildProjectFile)"
209209
Targets="WasmNestedPublishApp"
210-
Properties="_WasmInNestedPublish_UniqueProperty_XYZ=true;;WasmBuildingForNestedPublish=true;DeployOnBuild=;_IsPublishing=;_WasmIsPublishing=$(_IsPublishing)">
210+
Properties="_WasmInNestedPublish_UniqueProperty_XYZ=true;;WasmBuildingForNestedPublish=true;DeployOnBuild=;_IsPublishing=;_WasmIsPublishing=$(_IsPublishing);ResolveAssemblyReferencesFindRelatedSatellites=true">
211211
<Output TaskParameter="TargetOutputs" ItemName="WasmNestedPublishAppResultItems" />
212212
</MSBuild>
213213

@@ -503,6 +503,7 @@
503503
<Target Name="_AfterWasmBuildApp">
504504
<ItemGroup>
505505
<WasmAssembliesFinal Include="@(_WasmAssembliesInternal)" LlvmBitCodeFile="" />
506+
<WasmAssembliesFinal Include="@(_WasmSatelliteAssemblies)" />
506507
</ItemGroup>
507508
</Target>
508509
</Project>

src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ public override bool Execute()
111111
assetCandidate.SetMetadata("AssetTraitName", "Culture");
112112
assetCandidate.SetMetadata("AssetTraitValue", inferredCulture);
113113
assetCandidate.SetMetadata("RelativePath", $"_framework/{inferredCulture}/{satelliteAssembly.GetMetadata("FileName")}{satelliteAssembly.GetMetadata("Extension")}");
114-
assetCandidate.SetMetadata("RelatedAsset", Path.GetFullPath(Path.Combine(OutputPath, "wwwroot", "_framework", Path.GetFileName(assetCandidate.GetMetadata("ResolvedFrom")))));
114+
115+
var resolvedFrom = assetCandidate.GetMetadata("ResolvedFrom");
116+
if (resolvedFrom == "{RawFileName}") // Satellite assembly found from `<Reference />` element
117+
resolvedFrom = candidate.GetMetadata("OriginalItemSpec");
118+
119+
assetCandidate.SetMetadata("RelatedAsset", Path.GetFullPath(Path.Combine(OutputPath, "wwwroot", "_framework", Path.GetFileName(resolvedFrom))));
115120

116121
assetCandidates.Add(assetCandidate);
117122
continue;

0 commit comments

Comments
 (0)