Skip to content

Commit 18655ee

Browse files
authored
[browser][mt] Fix package microsoft.netcore.app.runtime.mono.multithread.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
1 parent 19dbb6a commit 18655ee

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

eng/testing/workloads-browser.targets

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@
4141
</ItemGroup>
4242
</Target>
4343

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

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

0 commit comments

Comments
 (0)