Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2cd8db0
Copy native wasm files to runtime pack
maraf Dec 12, 2025
0f58a1c
Register CoreCLR.sfxproj to get RuntimeList.xml
maraf Dec 12, 2025
301d804
WasmTestRunner and WasmSymbolicator
maraf Dec 12, 2025
61dbd7f
Don't import Mono NativeBuild targets for CoreCLR
maraf Dec 12, 2025
8066b26
Mono Sample with CoreCLR
maraf Dec 12, 2025
7d2620b
Defaults for CoreCLR on wasm
maraf Dec 12, 2025
15a1b5d
Placeholder for CoreCLR native build
maraf Dec 12, 2025
ff67465
Append .dll extention to mainAssemblyName
maraf Dec 12, 2025
8212ed6
Copy test runners
maraf Dec 12, 2025
5d4e456
Merge remote-tracking branch 'upstream/main' into BrowserCoreClrInTree
maraf Dec 15, 2025
55f90fb
Wasm.Build.Tests SDK
maraf Dec 15, 2025
63af39e
Skip InstallWorkloadFromArtifacts if no workloads selected
maraf Dec 16, 2025
2a736b1
WBT running main
maraf Dec 16, 2025
a7ee811
Prepare for skipping files from coreclr runtime pack
maraf Dec 16, 2025
84b8780
Pass DefaultTargetFramework to running browser
maraf Dec 16, 2025
5117784
Default to TestUsingWorkloads=false when RuntimeFlavor=CoreCLR
maraf Dec 16, 2025
54bc98f
Publish build artifacts
maraf Dec 16, 2025
03d4bcd
Include SDK related packages in coreclr-packages.proj
maraf Dec 17, 2025
e4baffa
Build Wasm.Build.Tests on CI for CoreCLR
maraf Dec 17, 2025
e2717cb
Build Wasm.Build.Tests on CI for CoreCLR (unique name)
maraf Dec 17, 2025
1c01837
Fix paths
maraf Dec 17, 2025
e9918f1
Build Wasm.Build.Tests on CI for CoreCLR (configuration=debug)
maraf Dec 17, 2025
ecdf53e
Build Wasm.Build.Tests on CI for CoreCLR (TestUsingWorkloads=false)
maraf Dec 17, 2025
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
128 changes: 128 additions & 0 deletions eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Depends on other builds to get runtime packs, and nugets
# And then runs Wasm.Build.Tests
parameters:
alwaysRun: false
isExtraPlatformsBuild: false
isWasmOnlyBuild: false
platforms: []
shouldContinueOnError: false
extraBuildArgs: ''

jobs:

- ${{ each platform in parameters.platforms }}:
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Debug
runtimeFlavor: mono
platforms:
- ${{ platform }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
variables:
# map dependencies variables to local variables
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: workloadsTestPreviousVersionsVar
value: false
# value: $[
# or(
# eq(variables['Build.SourceBranchName'], 'main'),
# eq(variables['System.PullRequest.TargetBranch'], 'main'))
# ]
- name: wbtProjectArg
${{ if eq(platform, 'browser_wasm_win') }}:
value: '-projects'
${{ else }}:
value: '--projects'
- name: shouldRunOnDefaultPipelines
value: $(shouldRunWasmBuildTestsOnDefaultPipeline)

jobParameters:
dependsOn:
- ${{ if eq(platform, 'browser_wasm') }}:
- build_browser_wasm_linux_Debug_AllSubsets_CoreCLR
- ${{ if eq(platform, 'browser_wasm_win') }}:
- build_browser_wasm_windows_Debug_AllSubsets_CoreCLR
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
testGroup: innerloop
nameSuffix: CoreCLR_WasmBuildTests

preBuildSteps:
# Download single threaded runtime packs, and tasks needed to build WBT
- task: DownloadBuildArtifacts@0
displayName: Download built nugets for singlethreaded runtime
inputs:
buildType: current
artifactName: 'BuildArtifacts_browser_wasm_$(_hostedOs)_Debug_AllSubsets_CoreCLR'
downloadType: single
downloadPath: '$(Build.SourcesDirectory)/artifacts'

- task: CopyFiles@2
displayName: Copy single threaded assets
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/BuildArtifacts_browser_wasm_$(_hostedOs)_Debug_AllSubsets_CoreCLR'
TargetFolder: '$(Build.SourcesDirectory)/artifacts'
CleanTargetFolder: false

# Download for multi-threaded
# - task: DownloadBuildArtifacts@0
# displayName: Download built nugets for multi-threaded runtime
# inputs:
# buildType: current
# artifactName: BuildArtifacts_browser_wasm_$(_hostedOs)_Release_MultiThreaded_BuildOnly
# downloadType: single
# downloadPath: '$(Build.SourcesDirectory)/artifacts'

# - task: CopyFiles@2
# displayName: Copy multithreading runtime pack
# inputs:
# SourceFolder: '$(Build.SourcesDirectory)/artifacts/BuildArtifacts_browser_wasm_$(_hostedOs)_Release_MultiThreaded_BuildOnly'
# Contents: packages/$(_BuildConfig)/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.*
# TargetFolder: '$(Build.SourcesDirectory)/artifacts'
# CleanTargetFolder: false

# Download WBT - TODO-WASM: This points to "mono" build, altough
- task: DownloadBuildArtifacts@0
displayName: Download Wasm.Build.Tests
inputs:
buildType: current
artifactName: WasmBuildTests_$(_hostedOs)_AllSubsets_CoreCLR
downloadType: single
downloadPath: '$(Build.SourcesDirectory)/artifacts'

- task: CopyFiles@2
displayName: Copy Wasm.Build.Tests archive
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/WasmBuildTests_$(_hostedOs)_AllSubsets_CoreCLR'
Contents: helix/**
TargetFolder: '$(Build.SourcesDirectory)/artifacts'
CleanTargetFolder: false

# build WBT
buildArgs: >-
$(wbtProjectArg) $(Build.SourcesDirectory)/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Build.binlog
/p:Configuration=$(_BuildConfig)
/p:TestUsingWorkloads=false
/p:InstallWorkloadForTesting=true
/p:WasmSkipMissingRuntimePackBuild=true
/p:PreparePackagesForWorkloadInstall=false
/p:WorkloadsTestPreviousVersions=$(workloadsTestPreviousVersionsVar)
/p:runtimeFlavor=CoreCLR
timeoutInMinutes: 180
condition: >-
or(
eq(variables['alwaysRunVar'], true),
eq(variables['isDefaultPipeline'], variables['shouldRunWasmBuildTestsOnDefaultPipeline']))

# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)_$(_hostedOs)
extraHelixArguments: /p:BrowserHost=$(_hostedOs)
scenarios:
- buildwasmapps
15 changes: 14 additions & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,16 @@ extends:
- browser_wasm_win
jobParameters:
nameSuffix: AllSubsets_CoreCLR
buildArgs: -s clr+libs+packs -c $(_BuildConfig) -lc Release
buildArgs: -s clr+libs+libs.tests+packs -c $(_BuildConfig) -lc Release /p:TestAssemblies=false /p:TestWasmBuildTests=true /p:ArchiveTests=true /p:InstallWorkloadForTesting=false
timeoutInMinutes: 120
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests.yml
parameters:
testBuildArgs: test JIT/interpreter/Interpreter.csproj
- template: /eng/pipelines/common/wasm-post-build-steps.yml
parameters:
publishArtifactsForWorkload: true
publishWBT: true
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
parameters:
Expand All @@ -130,6 +134,15 @@ extends:
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true),
eq(variables['isRollingBuild'], true))

# Browser Wasm.Build.Tests
- template: /eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml
parameters:
platforms:
- browser_wasm
- browser_wasm_win
alwaysRun: ${{ variables.isRollingBuild }}
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)

#
# Build CoreCLR and Libraries with Libraries tests
# For running libraries tests and installer tests
Expand Down
22 changes: 22 additions & 0 deletions eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
ReadWasmNativeAssetsFromFileSystem;
UpdateWasmNativeAssetOriginalItemSpec
</ResolveWasmOutputsDependsOn>
<ResolveWasmOutputsDependsOn Condition="'$(RuntimeFlavor)' == 'CoreCLR'">
$(ResolveWasmOutputsDependsOn);
AddTestRunnersToReferenceCopyLocalPaths
</ResolveWasmOutputsDependsOn>

<!-- set this when provisioning emsdk on CI -->
<EMSDK_PATH Condition="'$(EMSDK_PATH)' == '' and '$(ContinuousIntegrationBuild)' == 'true' and '$(MonoProjectRoot)' != ''">$([MSBuild]::NormalizeDirectory($(BrowserProjectRoot), 'emsdk'))</EMSDK_PATH>
Expand Down Expand Up @@ -176,6 +180,24 @@
</ItemGroup>
</Target>

<Target Name="AddTestRunnersToReferenceCopyLocalPaths"
AfterTargets=""
Condition="'$(TestFramework)' == 'xunit'">
<ItemGroup>
<_runnerFilesToBuild Include="$(WasmTestRunnerDir)*" />

<!-- Remove runner files that already exist in ResolvedFileToBuild to avoid double Building -->
<_resolvedFilesToBuildToFileName Include="@(ReferenceCopyLocalPaths -> '%(FileName)%(Extension)')" />

<_runnerFilesToBuildToFileName Include="@(_runnerFilesToBuild -> '%(FileName)%(Extension)')">
<OriginalIdentity>%(Identity)</OriginalIdentity>
</_runnerFilesToBuildToFileName>
<_runnerFilesToBuildToFileName Remove="@(_resolvedFilesToBuildToFileName)" />

<ReferenceCopyLocalPaths Include="@(_runnerFilesToBuildToFileName -> '%(OriginalIdentity)')" RelativePath="%(FileName)%(Extension)" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" PostprocessAssembly="true" />
</ItemGroup>
</Target>

<UsingTask TaskName="Microsoft.WebAssembly.Build.Tasks.LinkContentToWwwroot" AssemblyFile="$(WasmBuildTasksAssemblyPath)" Condition="'$(TestTrimming)' != 'true'" />

<Target Name="LinkContentToWwwroot" BeforeTargets="ResolveProjectStaticWebAssets" Condition="'$(TargetOS)' == 'browser' and '$(WasmBuildingForNestedPublish)' != 'true' and '$(TestTrimming)' != 'true'">
Expand Down
26 changes: 18 additions & 8 deletions eng/testing/workloads-browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<Target Name="_GetWorkloadsToInstall" DependsOnTargets="_SetPackageVersionForWorkloadsTesting" Returns="@(WorkloadIdForTesting);@(WorkloadCombinationsToInstall)">
<Error Condition="'$(RIDForWorkload)' == ''" Text="$(RIDForWorkload) is unset" />
<ItemGroup>
<ItemGroup Condition="'$(RuntimeFlavor)' == 'Mono'">
<WorkloadIdForTesting Include="wasm-tools;wasm-experimental"
ManifestName="Microsoft.NET.Workload.Mono.ToolChain.Current"
Variant="latest"
Expand Down Expand Up @@ -73,16 +73,11 @@
</_DefaultRuntimePackNuGetPath>
</PropertyGroup>

<ItemGroup>
<ItemGroup Condition="'$(RuntimeFlavor)' == 'Mono'">
<_RuntimePackNugetAvailable Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.$(RIDForWorkload).*$(PackageVersionForWorkloadManifests).nupkg" />
<_RuntimePackNugetAvailable Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.Mono.*.$(RIDForWorkload).*$(PackageVersionForWorkloadManifests).nupkg" />
<_RuntimePackNugetAvailable Remove="@(_RuntimePackNugetAvailable)" Condition="$([System.String]::new('%(_RuntimePackNugetAvailable.FileName)').EndsWith('.symbols'))" />
</ItemGroup>

<Error Condition="@(_RuntimePackNugetAvailable -> Count()) != 2 and @(_RuntimePackNugetAvailable -> Count()) != 1"
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 NuGetsToBuildForWorkloadTesting -->
<NuGetsToBuildForWorkloadTesting Include="$(_DefaultRuntimePackNuGetPath)"
Expand All @@ -91,6 +86,21 @@
Properties="@(_DefaultPropsForNuGetBuild, ';');WasmEnableThreads=$(_IsMTNugetMissing)"
Descriptor="$(_Descriptor)"/>
</ItemGroup>
<ItemGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR'">
<_RuntimePackNugetAvailable Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.$(RIDForWorkload).*$(PackageVersionForWorkloadManifests).nupkg" />
<_RuntimePackNugetAvailable Remove="@(_RuntimePackNugetAvailable)" Condition="$([System.String]::new('%(_RuntimePackNugetAvailable.FileName)').EndsWith('.symbols'))" />

<!-- 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 NuGetsToBuildForWorkloadTesting -->
<NuGetsToBuildForWorkloadTesting Include="$(_DefaultRuntimePackNuGetPath)"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj"
Dependencies="$(_DefaultRuntimePackNuGetPath)"
Properties="@(_DefaultPropsForNuGetBuild, ';');WasmEnableThreads=$(_IsMTNugetMissing);RuntimeFlavor=CoreCLR"
Descriptor="$(_Descriptor)"/>
</ItemGroup>

<Error Condition="@(_RuntimePackNugetAvailable -> Count()) != 2 and @(_RuntimePackNugetAvailable -> Count()) != 1"
Text="Expected to find either one or two in $(LibrariesShippingPackagesDir): @(_RuntimePackNugetAvailable->'%(FileName)%(Extension)')" />

<Message
Condition="@(_RuntimePackNugetAvailable -> Count()) == 1"
Expand Down
3 changes: 2 additions & 1 deletion eng/testing/workloads-wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
<NuGetsToBuildForWorkloadTesting Include="$(_AOTCrossNuGetPath)"
Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\MonoCrossAOT\Microsoft.NETCore.App.MonoCrossAOT.$(RIDForWorkload).sfxproj"
Properties="@(_PropsForAOTCrossBuild,';')"
Descriptor="AOT Cross compiler"/>
Descriptor="AOT Cross compiler"
Condition="'$(RuntimeFlavor)' == 'Mono'" />
</ItemGroup>
</Target>
</Project>
8 changes: 8 additions & 0 deletions src/coreclr/.nuget/coreclr-packages.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@
<ProjectReference Include="Microsoft.NETCore.ILDAsm\Microsoft.NETCore.ILDAsm.proj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
<ProjectReference Include="$(MonoProjectRoot)\nuget\Microsoft.NETCore.BrowserDebugHost.Transport\Microsoft.NETCore.BrowserDebugHost.Transport.pkgproj" />
<ProjectReference Include="$(MonoProjectRoot)\wasm\templates\Microsoft.NET.Runtime.WebAssembly.Templates.csproj" />
<ProjectReference Include="$(MonoProjectRoot)\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\Microsoft.NET.Sdk.WebAssembly.Pack.pkgproj" />

<ProjectReference Include="$(MonoProjectRoot)\nuget\Microsoft.NET.Runtime.WorkloadTesting.Internal\Microsoft.NET.Runtime.WorkloadTesting.Internal.pkgproj" />
</ItemGroup>

<Import Project="versioning.targets" />
</Project>
7 changes: 5 additions & 2 deletions src/libraries/pretest.proj
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@

<ProjectReference Include="$(CommonTestPath)AppleTestRunner\AppleTestRunner.csproj" Condition="'$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'"/>
<ProjectReference Include="$(CommonTestPath)AndroidTestRunner\AndroidTestRunner.csproj" Condition="'$(TargetOS)' == 'android'" />
<ProjectReference Include="$(CommonTestPath)WasmTestRunner\WasmTestRunner.csproj" Condition="('$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi') and '$(RuntimeFlavor)' == 'Mono'" />
<ProjectReference Include="$(MonoProjectRoot)wasm\symbolicator\WasmSymbolicator.csproj" Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'Mono'" />
<ProjectReference Include="$(CommonTestPath)WasmTestRunner\WasmTestRunner.csproj" Condition="('$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi')" />
<ProjectReference Include="$(MonoProjectRoot)wasm\symbolicator\WasmSymbolicator.csproj" Condition="'$(TargetOS)' == 'browser'" />

<!-- needed to test workloads for wasm -->
<ProjectReference Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.Mono.sfxproj"
Pack="true"
Condition="('$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi') and '$(RuntimeFlavor)' == 'Mono'" />
<ProjectReference Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj"
Pack="true"
Condition="('$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi') and '$(RuntimeFlavor)' == 'CoreCLR'" />
</ItemGroup>

<ItemGroup Condition="'$(TestReadyToRun)' == 'true'">
Expand Down
9 changes: 9 additions & 0 deletions src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<!-- TODO-WASM: These targets are invoked by public WasmSDK -->
<Target Name="WasmBuildApp">
<Message Importance="high" Text="WasmBuildApp for CoreCLR not implemented" />
</Target>
<Target Name="WasmTriggerPublishApp">
<Message Importance="high" Text="WasmTriggerPublishApp for CoreCLR not implemented" />
</Target>
</Project>
10 changes: 9 additions & 1 deletion src/mono/browser/build/WasmApp.InTree.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk.WebAssembly" Project="Sdk.props" Condition="'$(UsingNativeAOT)' != 'true' and '$(UsingMicrosoftNETSdkWebAssembly)' == 'true'" />
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.props" Condition="'$(UsingNativeAOT)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.props" Condition="'$(UsingNativeAOT)' != 'true' and '$(RuntimeFlavor)' == 'Mono'" />

<!-- TODO-WASM https://github.com/dotnet/runtime/issues/120248 (CoreCLR on wasm defaults) -->
<PropertyGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR'">
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
<WasmEnableWebcil>false</WasmEnableWebcil>
<EnableAggressiveTrimming>false</EnableAggressiveTrimming>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsOutputTypeLibrary)' == 'true'">
<OutputType>library</OutputType>
Expand Down
3 changes: 2 additions & 1 deletion src/mono/browser/build/WasmApp.InTree.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

<!-- TODO: this breaks runtime tests on Helix due to the file not being there for some reason. Once this is fixed we can remove the UpdateRuntimePack target here -->
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(TargetingpacksTargetsImported)' != 'true' and '$(ImportTargetingPacksTargetsInWasmAppTargets)' == 'true'"/>
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.targets" Condition="'$(UsingNativeAOT)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.targets" Condition="'$(UsingNativeAOT)' != 'true' and '$(RuntimeFlavor)' == 'Mono'" />
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.CoreCLR.targets" Condition="'$(UsingNativeAOT)' != 'true' and '$(RuntimeFlavor)' == 'CoreCLR'" />
<Import Project="$(MSBuildThisFileDirectory)EmSdkRepo.Defaults.props" Condition="'$(UsingNativeAOT)' == 'true' and '$(EMSDK_PATH)' != ''" />
<Import Project="$(MSBuildThisFileDirectory)WasmApp.InTree.CI.targets" Condition="'$(ContinuousIntegrationBuild)' == 'true'" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
</ItemGroup>

<Message Text="Packages found in $(BuiltNugetsDir): @(_BuiltNuGets)" Importance="Low" />
<Message Text="Skipping 'InstallWorkloadFromArtifacts' as no workloads selected for installation" Importance="Low" Condition="@(_SdkWithWorkloadToInstall->Count()) == 0" />

<InstallWorkloadFromArtifacts
WorkloadIds="@(WorkloadIdForTesting)"
Expand All @@ -212,6 +213,7 @@
WorkloadInstallCommandOutputImportance="$(WorkloadInstallCommandOutputImportance)"
IntermediateOutputPath="$(ArtifactsObjDir)"
SkipTempDirectoryCleanup="$(SkipTempDirectoryCleanup)"
Condition="@(_SdkWithWorkloadToInstall->Count()) > 0"
/>

<Touch Files="$(_SdkWithNoWorkloadStampPath)" AlwaysCreate="true" />
Expand Down
9 changes: 9 additions & 0 deletions src/mono/sample/wasm/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<Project>
<PropertyGroup>
<!-- RuntimeFlavor must be set during evaluation to import correct targets -->
<RuntimeFlavor Condition="'$(Nested_RuntimeFlavor)' != ''">$(Nested_RuntimeFlavor)</RuntimeFlavor>
</PropertyGroup>

<Import Project="../Directory.Build.targets" />
<Import Project="$(BrowserProjectRoot)build\WasmApp.InTree.targets" />

Expand Down Expand Up @@ -37,6 +42,10 @@
<NestedBuildProperty Include="EnableDiagnostics" />
<NestedBuildProperty Include="DiagnosticPorts" />
<NestedBuildProperty Include="WasmPerformanceInstrumentation" />
<NestedBuildProperty Include="RuntimeFlavor" />
<NestedBuildProperty Include="WasmEnableWebcil" />
<NestedBuildProperty Include="EnableAggressiveTrimming" />
<NestedBuildProperty Include="TrimMode" />
</ItemGroup>

<Target Name="BuildSampleInTree"
Expand Down
Loading
Loading