Skip to content

[wasm] Fix circular dependency in WasmAppBuilder #58904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 13, 2021
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
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