Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[wasm] Fix circular dependency in WasmAppBuilder
Fixes #58816
  • Loading branch information
radical committed Sep 9, 2021
commit 040570368c8017bf3bcde35965a23725449e6995
5 changes: 3 additions & 2 deletions src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
</ItemGroup>

<Target Name="PublishBuilder"
AfterTargets="Build">
AfterTargets="Build"
Condition="'$(_RunningForPublishBuilder)' != 'true'">

<!-- needed for publishing with multi-targeting. We are publishing essentially to get the SR.MetadataLoadContext.dll :/ -->
<ItemGroup>
<_PublishFramework Include="$(TargetFrameworks)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Publish" Properties="TargetFramework=%(_PublishFramework.Identity)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Publish" Properties="TargetFramework=%(_PublishFramework.Identity);_RunningForPublishBuilder=true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Global properties added to MSBuild invocation. This is a recipe for a build race condition. The global property defeats the MSBuild results cache and also can cause concurrent builds to the same path if the global property doesn’t change output directories.

</Target>

<Target Name="GetFilesToPackage" Returns="@(FilesToPackage)">
Expand Down