From 6e894a87a7cc69ac90817860534c7fe223eae4cb Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 17 Dec 2024 12:58:24 +0100 Subject: [PATCH] [wasm] Fix rebuild of browser-bench with startup apps (#110776) This fixes 2 issues * clean build of browser-bench with startup apps failed, because WBT's dotnet-latest wasn't available when setting the sdk spath * problem with rebuilding WBT, where WBT fails with ``` runtime/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets(201,5): error MSB4018: The "InstallWorkloadFromArtifacts" task failed unexpectedly. [runtime/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj] [runtime/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj] runtime/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets(201,5): error MSB4018: System.IO.IOException: Directory not empty : 'runtime/artifacts/bin/dotnet-latest/host/fxr/10.0.0-alpha.1.24610.2' [runtime/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj] [runtime/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj] runtime/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets(201,5): error MSB4018: at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath) [runtime/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj] [runtime/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj] runtime/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets(201,5): error MSB4018: at Microsoft.Workload.Build.Tasks.InstallWorkloadFromArtifacts.Execute() [runtime/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj] [runtime/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj] runtime/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets(201,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() [runtime/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj] [runtime/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj] runtime/src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets(201,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [runtime/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj] [runtime/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj] 0 Warning(s) 1 Error(s) ``` --- .../wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj b/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj index b1cc1e204b827..7ff54dab05851 100644 --- a/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj +++ b/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj @@ -43,13 +43,15 @@ - - + + + + %(ArtifactsDotnetLatestSdks.RootDir)%(ArtifactsDotnetLatestSdks.Directory)Sdks @@ -68,7 +70,7 @@ $(MSBuildThisFileDirectory)nugetPackages - + <_ScriptExt Condition="'$(OS)' == 'Windows_NT'">.cmd <_ScriptExt Condition="'$(OS)' != 'Windows_NT'">.sh