From 6167230643546570769a3485d21dc25a137e132b Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Sun, 30 Jul 2023 20:38:29 -0400 Subject: [PATCH 01/14] [wasm] Remove hardcoded references to `net8.0` from WasmApp*targets Fixes https://github.com/dotnet/runtime/issues/79109 . --- src/mono/wasm/build/WasmApp.Native.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 6d1d4e23fcacbd..2e42e24c528863 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -312,7 +312,7 @@ <_HasMscorlib Condition="'%(_WasmAssembliesInternal.FileName)%(_WasmAssembliesInternal.Extension)' == 'mscorlib.dll'">true - <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$(MicrosoftNetCoreAppRuntimePackRidDir)lib\net8.0\mscorlib.dll + <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$(MicrosoftNetCoreAppRuntimePackRidDir)lib\$(TargetFramework)\mscorlib.dll <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)" /> - <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net8.0" /> + <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\$(TargetFramework)" /> From 38d74d9bbc058e704e8f2edd5c934c2f15fd7f80 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Mon, 31 Jul 2023 19:16:34 -0400 Subject: [PATCH 02/14] Address feedback from @viktorhofer --- src/mono/wasm/build/WasmApp.Native.targets | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 2e42e24c528863..c154059205dfaf 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -312,7 +312,7 @@ <_HasMscorlib Condition="'%(_WasmAssembliesInternal.FileName)%(_WasmAssembliesInternal.Extension)' == 'mscorlib.dll'">true - <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$(MicrosoftNetCoreAppRuntimePackRidDir)lib\$(TargetFramework)\mscorlib.dll + <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">@(RuntimePackAsset->WithMetadataValue('Filename', 'mscorlib')) <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)" /> - <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\$(TargetFramework)" /> + + + <_SystemIOPath Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)\lib\*\System.IO.dll" /> + <_WasmAOTSearchPaths Include="%(_SystemIOPath.Identity)" /> From a358520c6762a006748d8286851b82dab5af77d9 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 1 Aug 2023 11:22:12 -0400 Subject: [PATCH 03/14] address review feedback --- src/mono/wasm/build/WasmApp.Native.targets | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index c154059205dfaf..496c31325c3e26 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -600,6 +600,10 @@ <_MonoAotCrossCompilerPath>@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','browser-wasm')) + + + <_SystemIOPath>@(RuntimePackAsset->WithMetadataValue('Filename', 'System.IO')) @@ -628,10 +632,7 @@ <_WasmAssembliesInternal Remove="@(_WasmAssembliesInternal)" /> <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)" /> - - - <_SystemIOPath Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)\lib\*\System.IO.dll" /> - <_WasmAOTSearchPaths Include="%(_SystemIOPath.Identity)" /> + <_WasmAOTSearchPaths Include="$([System.IO.Path]::GetDirectoryName('$(_SystemIOPath)'))" /> From 33a6aa4129b41d5fa6d33143461651a3bf0ce455 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 1 Aug 2023 11:41:03 -0400 Subject: [PATCH 04/14] Use System.Runtime.dll instead of System.IO.dll --- src/mono/wasm/build/WasmApp.Native.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 496c31325c3e26..2f35c44af70c99 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -603,7 +603,7 @@ - <_SystemIOPath>@(RuntimePackAsset->WithMetadataValue('Filename', 'System.IO')) + <_SystemRuntimePath>@(RuntimePackAsset->WithMetadataValue('Filename', 'System.Runtime')) @@ -632,7 +632,7 @@ <_WasmAssembliesInternal Remove="@(_WasmAssembliesInternal)" /> <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)" /> - <_WasmAOTSearchPaths Include="$([System.IO.Path]::GetDirectoryName('$(_SystemIOPath)'))" /> + <_WasmAOTSearchPaths Include="$([System.IO.Path]::GetDirectoryName('$(_SystemRuntimePath)'))" /> From b0cd0251860dd27cf94b1736f909871c6e4e69da Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 1 Aug 2023 22:20:35 +0000 Subject: [PATCH 05/14] Fix local run with BuildAOTTestsOnHelix=true, to get the correct tasks config --- eng/testing/tests.browser.targets | 2 +- src/mono/wasm/build/WasmApp.LocalBuild.props | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/testing/tests.browser.targets b/eng/testing/tests.browser.targets index 837c0589501f2e..f53072182007bd 100644 --- a/eng/testing/tests.browser.targets +++ b/eng/testing/tests.browser.targets @@ -126,7 +126,7 @@ <_AOTBuildCommand Condition="'$(BrowserHost)' == 'windows'">dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:%XHARNESS_OUT%/AOTBuild.binlog - <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration) + <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration) /p:TasksConfiguration=$(TasksConfiguration) <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation) <_AOTBuildCommand>$(_AOTBuildCommand) $(_ShellCommandSeparator) cd wasm_build/AppBundle diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index 3e40422f9e5031..63e88617f74657 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -33,10 +33,10 @@ $([MSBuild]::NormalizeDirectory($(ArtifactsBinDir), 'microsoft.netcore.app.runtime.browser-wasm', $(RuntimeConfig))) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(_TargetFrameworkForNETCoreTasks)')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(_TargetFrameworkForNETCoreTasks)', 'publish')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(_TargetFrameworkForNETCoreTasks)')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoTargetsTasks', 'Debug', '$(_TargetFrameworkForNETCoreTasks)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', '$(TasksConfiguration)', '$(_TargetFrameworkForNETCoreTasks)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', '$(TasksConfiguration)', '$(_TargetFrameworkForNETCoreTasks)', 'publish')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', '$(TasksConfiguration)', '$(_TargetFrameworkForNETCoreTasks)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoTargetsTasks', '$(TasksConfiguration)', '$(_TargetFrameworkForNETCoreTasks)')) $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'mono', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfig)')) <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoArtifactsPath), 'cross', '$(TargetOS)-$(TargetArchitecture.ToLowerInvariant())', 'mono-aot-cross')) From bc07a5175f2f0fedeae0617a96d0e6172293325c Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 1 Aug 2023 22:46:57 +0000 Subject: [PATCH 06/14] Add $(MicrosoftNetCoreAppRuntimePackRidLibTfmDir) --- src/mono/wasm/build/WasmApp.Native.targets | 9 +++------ src/mono/wasm/build/WasmApp.targets | 7 +++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 2f35c44af70c99..93a9f9e2aa747e 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -312,9 +312,10 @@ <_HasMscorlib Condition="'%(_WasmAssembliesInternal.FileName)%(_WasmAssembliesInternal.Extension)' == 'mscorlib.dll'">true - <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">@(RuntimePackAsset->WithMetadataValue('Filename', 'mscorlib')) + <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$([MSBuild]::NormalizePath($(MicrosoftNetCoreAppRuntimePackRidLibTfmDir), 'mscorlib.dll')) + @@ -600,10 +601,6 @@ <_MonoAotCrossCompilerPath>@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','browser-wasm')) - - - <_SystemRuntimePath>@(RuntimePackAsset->WithMetadataValue('Filename', 'System.Runtime')) @@ -632,7 +629,7 @@ <_WasmAssembliesInternal Remove="@(_WasmAssembliesInternal)" /> <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)" /> - <_WasmAOTSearchPaths Include="$([System.IO.Path]::GetDirectoryName('$(_SystemRuntimePath)'))" /> + <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)" /> diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 844f863f69c7b8..ad072090cc9200 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -257,6 +257,11 @@ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir))) $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native')) + + <_SystemRuntimePath Condition="'%(RuntimePackAsset.Filename)%(RuntimePackAsset.Extension)' == 'System.Runtime.dll'">@(RuntimePackAsset) + $([System.IO.Path]::GetDirectoryName('$(_SystemRuntimePath)')) + <_WasmRuntimePackIncludeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include')) <_WasmRuntimePackSrcDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'src')) @@ -269,6 +274,8 @@ <_WasmShouldAOT Condition="'$(_WasmShouldAOT)' == ''">false + + From ba1dfdc3e3fc5259b97a555288c440d3eff95867 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 1 Aug 2023 22:47:34 +0000 Subject: [PATCH 07/14] WasmApp.LocalBuild.props: populate a synthetic RuntimePackAsset item, as native build depends on that --- src/mono/wasm/build/WasmApp.LocalBuild.props | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index 63e88617f74657..66c36951d081e4 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -69,4 +69,7 @@ $([MSBuild]::NormalizePath('$(MonoTargetsTasksDir)', 'MonoTargetsTasks.dll')) + + + From 1974848b2cd9279cdaeac0a2b59bd04220ca4199 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 1 Aug 2023 22:06:17 -0400 Subject: [PATCH 08/14] WasmApp.targets: Fix the logic to find runtime pack path with the .. assemblies. `RuntimePackAsset` can't be reliably used because it is not always available in the various test setups used. Instead, find `System.Runtime.dll` in the runtime pack path, which is already known. --- src/mono/wasm/build/WasmApp.LocalBuild.props | 3 --- src/mono/wasm/build/WasmApp.Native.targets | 2 +- src/mono/wasm/build/WasmApp.targets | 16 +++++++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index 66c36951d081e4..63e88617f74657 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -69,7 +69,4 @@ $([MSBuild]::NormalizePath('$(MonoTargetsTasksDir)', 'MonoTargetsTasks.dll')) - - - diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 93a9f9e2aa747e..5ab27d64160d26 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -312,7 +312,7 @@ <_HasMscorlib Condition="'%(_WasmAssembliesInternal.FileName)%(_WasmAssembliesInternal.Extension)' == 'mscorlib.dll'">true - <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$([MSBuild]::NormalizePath($(MicrosoftNetCoreAppRuntimePackRidLibTfmDir), 'mscorlib.dll')) + <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$([System.IO.Path]::Combine($(MicrosoftNetCoreAppRuntimePackRidLibTfmDir), 'mscorlib.dll')) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index ad072090cc9200..12746f0db6a135 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -257,10 +257,6 @@ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir))) $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native')) - - <_SystemRuntimePath Condition="'%(RuntimePackAsset.Filename)%(RuntimePackAsset.Extension)' == 'System.Runtime.dll'">@(RuntimePackAsset) - $([System.IO.Path]::GetDirectoryName('$(_SystemRuntimePath)')) <_WasmRuntimePackIncludeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include')) <_WasmRuntimePackSrcDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'src')) @@ -274,7 +270,17 @@ <_WasmShouldAOT Condition="'$(_WasmShouldAOT)' == ''">false - + + + <_SystemRuntimePathItem Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> + + + $([System.IO.Path]::GetDirectoryName(%(_SystemRuntimePathItem.Identity))) + + + + From d997f9d1bc26627351fa86fa21041ee8df2ed4a4 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 2 Aug 2023 00:06:16 -0400 Subject: [PATCH 09/14] WasmApp.targets - error check before using the item --- src/mono/wasm/build/WasmApp.targets | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 12746f0db6a135..81423fa1681bdd 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -275,13 +275,14 @@ Cannot use System.Private.Corelib since that is in a different directory --> <_SystemRuntimePathItem Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> - - $([System.IO.Path]::GetDirectoryName(%(_SystemRuntimePathItem.Identity))) - + + $([System.IO.Path]::GetDirectoryName(%(_SystemRuntimePathItem.Identity))) + + From 685a39f393aa5570b1afd831d2d7c618827eddee Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 2 Aug 2023 12:51:35 -0400 Subject: [PATCH 10/14] Fix runtime tests, by overriding the path to the assemblies --- src/mono/wasm/build/WasmApp.targets | 5 ++++- src/tests/Common/wasm-test-runner/WasmTestRunner.proj | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 81423fa1681bdd..5591593c8f489d 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -273,7 +273,10 @@ - <_SystemRuntimePathItem Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> + <_SystemRuntimePathItem Condition="'$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)' == ''" Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> + + + <_SystemRuntimePathItem Condition="'$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)' != ''" Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)\System.Runtime.dll" /> diff --git a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj index 781c4935194360..86e54367f65b7b 100644 --- a/src/tests/Common/wasm-test-runner/WasmTestRunner.proj +++ b/src/tests/Common/wasm-test-runner/WasmTestRunner.proj @@ -9,6 +9,7 @@ false $(CORE_ROOT)\runtimepack-non-existent $(CORE_ROOT)\runtimepack + $(MicrosoftNetCoreAppRuntimePackRidDir)\native $(NetCoreAppCurrent) $(MSBuildThisFileDirectory)\obj\$(Configuration)\wasm $(TestBinDir)/WasmApp/ From cb6337750139e15de95b282a1e983fe01b3ca037 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 2 Aug 2023 12:53:49 -0400 Subject: [PATCH 11/14] Fix runtime tests, by overriding the path to the assemblies --- src/mono/wasm/build/WasmApp.targets | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 5591593c8f489d..1c37b903707c10 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -270,19 +270,16 @@ <_WasmShouldAOT Condition="'$(_WasmShouldAOT)' == ''">false - + - <_SystemRuntimePathItem Condition="'$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)' == ''" Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> - - - <_SystemRuntimePathItem Condition="'$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)' != ''" Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)\System.Runtime.dll" /> + <_SystemRuntimePathItem Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> - - + + - + $([System.IO.Path]::GetDirectoryName(%(_SystemRuntimePathItem.Identity))) From 1af5539cffde1f26e6500ec0528b9d20de0cafbc Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 3 Aug 2023 11:41:59 -0400 Subject: [PATCH 12/14] Apply the same changes to wasi targets also --- src/mono/wasi/build/WasiApp.Native.targets | 6 ++++-- src/mono/wasi/build/WasiApp.targets | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/mono/wasi/build/WasiApp.Native.targets b/src/mono/wasi/build/WasiApp.Native.targets index bcc99310d6d897..36c66585870a2c 100644 --- a/src/mono/wasi/build/WasiApp.Native.targets +++ b/src/mono/wasi/build/WasiApp.Native.targets @@ -237,9 +237,11 @@ <_HasMscorlib Condition="'%(_WasmAssembliesInternal.FileName)%(_WasmAssembliesInternal.Extension)' == 'mscorlib.dll'">true - <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$(MicrosoftNetCoreAppRuntimePackRidDir)lib\net8.0\mscorlib.dll + <_MscorlibPath Condition="'$(_HasMscorlib)' != 'true'">$([System.IO.Path]::Combine($(MicrosoftNetCoreAppRuntimePackRidLibTfmDir), 'mscorlib.dll')) + + @@ -525,7 +527,7 @@ <_WasmAssembliesInternal Remove="@(_WasmAssembliesInternal)" /> <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)" /> - <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net8.0" /> + <_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)" /> diff --git a/src/mono/wasi/build/WasiApp.targets b/src/mono/wasi/build/WasiApp.targets index 8909c89aa44009..c5669bc8a561ca 100644 --- a/src/mono/wasi/build/WasiApp.targets +++ b/src/mono/wasi/build/WasiApp.targets @@ -245,6 +245,19 @@ <_WasmShouldAOT Condition="'$(_WasmShouldAOT)' == ''">false + + + <_SystemRuntimePathItem Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net*\System.Runtime.dll" /> + + + + + + + $([System.IO.Path]::GetDirectoryName(%(_SystemRuntimePathItem.Identity))) + + From 5119f43efb159e1425b959ce9d1f91bfbf772751 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 3 Aug 2023 11:44:51 -0400 Subject: [PATCH 13/14] fix --- eng/testing/tests.wasi.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/tests.wasi.targets b/eng/testing/tests.wasi.targets index 14b217bbec6754..b95127d6132266 100644 --- a/eng/testing/tests.wasi.targets +++ b/eng/testing/tests.wasi.targets @@ -57,7 +57,7 @@ <_AOTBuildCommand Condition="'$(BrowserHost)' == 'windows'">$(_AOTBuildCommand) "/p:WasmCachePath=%USERPROFILE%\.emscripten-cache" - <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration) + <_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration) /p:TasksConfiguration=$(TasksConfiguration) <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation) <_AOTBuildCommand>$(_AOTBuildCommand) $(_ShellCommandSeparator) cd wasm_build/AppBundle From 6106560f1677b77d96f573db9ee23d678381a49a Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 3 Aug 2023 11:47:16 -0400 Subject: [PATCH 14/14] fix --- src/mono/wasm/build/WasmApp.targets | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 1c37b903707c10..e6e058585a62f7 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -257,7 +257,6 @@ $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir))) $([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidDir), 'native')) - <_WasmRuntimePackIncludeDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'include')) <_WasmRuntimePackSrcDir>$([MSBuild]::NormalizeDirectory($(MicrosoftNetCoreAppRuntimePackRidNativeDir), 'src'))