Skip to content

Commit 4b3d197

Browse files
authored
Make PrepareForWasmBuild work with wasm workload (#1746)
The `WasmBuildAppDependsOn` property gets overwritten by the wasm-tools workload's https://github.com/dotnet/runtime/blob/main/src/mono/wasm/build/WasmApp.props#L9-L18 So instead, set the `WasmBuildAppAfterThisTarget` property to our `PrepareForWasmBuild` target and make it run after `Publish` target. The workload's `WasmApp` has condition on `WasmBuildAppAfterThisTarget` and should not overwrite it.
1 parent acb6f20 commit 4b3d197

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/BenchmarkDotNet/Templates/WasmAotCsProj.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
</ItemGroup>
3434

3535
<PropertyGroup>
36-
<WasmBuildAppDependsOn>PrepareForWasmBuild;$(WasmBuildAppDependsOn)</WasmBuildAppDependsOn>
36+
<WasmBuildAppAfterThisTarget>PrepareForWasmBuild</WasmBuildAppAfterThisTarget>
3737
</PropertyGroup>
38-
<Target Name="PrepareForWasmBuild">
38+
<Target Name="PrepareForWasmBuild" AfterTargets="Publish">
3939
<ItemGroup>
4040
<WasmAssembliesToBundle Include="$(TargetDir)publish\*.dll" />
4141
</ItemGroup>

src/BenchmarkDotNet/Templates/WasmCsProj.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
</ItemGroup>
3535

3636
<PropertyGroup>
37-
<WasmBuildAppDependsOn>PrepareForWasmBuild;$(WasmBuildAppDependsOn)</WasmBuildAppDependsOn>
37+
<WasmBuildAppAfterThisTarget>PrepareForWasmBuild</WasmBuildAppAfterThisTarget>
3838
</PropertyGroup>
39-
<Target Name="PrepareForWasmBuild">
39+
<Target Name="PrepareForWasmBuild" AfterTargets="Publish">
4040
<ItemGroup>
4141
<WasmAssembliesToBundle Include="$(TargetDir)publish\*.dll" />
4242
</ItemGroup>

0 commit comments

Comments
 (0)