Skip to content

Commit

Permalink
[browser][mt] Fix `package microsoft.netcore.app.runtime.mono.multith…
Browse files Browse the repository at this point in the history
…read.browser-wasm is not found` (#98083)

* Invert the logic: prepare MT nuget for ST and ST nuget for MT.

* We have only 2 runtimes now.

* Added clarification
  • Loading branch information
ilonatommy authored Feb 7, 2024
1 parent 19dbb6a commit 18655ee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions eng/testing/workloads-browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@
</ItemGroup>
</Target>

<!-- For local builds, only one of the 3 required runtime packs might be available. In that case,
<!-- For local builds, only one of the 2 required runtime packs might be available. In that case,
build the other nugets with the *same runtime* but different names.
-->
<Target Name="_GetRuntimePackNuGetsToBuild" Condition="'$(WasmSkipMissingRuntimePackBuild)' != 'true'" Returns="@(_NuGetsToBuild)">
<Error Condition="'$(RIDForWorkload)' == ''" Text="$(RIDForWorkload) is unset" />
<PropertyGroup>
<_BuildVariant Condition="'$(WasmEnableThreads)' == 'true'">multithread</_BuildVariant>
<_Descriptor Condition="'$(WasmEnableThreads)' == 'true'">runtime pack for $(_BuildVariant)</_Descriptor>
<_Descriptor Condition="'$(WasmEnableThreads)' != 'true'">single threaded runtime pack</_Descriptor>
<_IsMTNugetMissing Condition="'$(WasmEnableThreads)' != 'true'">true</_IsMTNugetMissing>
<_BuildVariant Condition="'$(_IsMTNugetMissing)' == 'true'">multithread</_BuildVariant>
<_Descriptor Condition="'$(_IsMTNugetMissing)' == 'true'">runtime pack for $(_BuildVariant)</_Descriptor>
<_Descriptor Condition="'$(_IsMTNugetMissing)' != 'true'">single threaded runtime pack</_Descriptor>
<_DefaultRuntimePackNuGetPath>$([System.String]::Join('.',
$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono,
$(_BuildVariant),
Expand All @@ -67,10 +68,12 @@
Text="Expected to find either one or two in $(LibrariesShippingPackagesDir): @(_RuntimePackNugetAvailable->'%(FileName)%(Extension)')" />

<ItemGroup>
<!-- We need nugets for all wasm runtime flavors. The one corresponding the current
property values is already built, the others need to be added to _NuGetsToBuild -->
<_NuGetsToBuild Include="$(_DefaultRuntimePackNuGetPath)"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj"
Dependencies="$(_DefaultRuntimePackNuGetPath)"
Properties="@(_DefaultPropsForNuGetBuild, ';');WasmEnableThreads=$(WasmEnableThreads)"
Properties="@(_DefaultPropsForNuGetBuild, ';');WasmEnableThreads=$(_IsMTNugetMissing)"
Descriptor="$(_Descriptor)"/>
</ItemGroup>

Expand Down

0 comments on commit 18655ee

Please sign in to comment.