diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 4de29857494251..c9711aff2d5bfb 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -183,10 +183,8 @@
-
+
-
-
diff --git a/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets b/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
index e94f759abc4f69..52dece99895f9c 100644
--- a/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
+++ b/src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
@@ -178,6 +178,53 @@
'$(WasmBuildingForNestedPublish)' != 'true' and
'$(UsingBrowserRuntimeWorkload)' != 'true'" />
+
+
+
+
+ <_CoreCLRRuntimePackDir>$(MicrosoftNetCoreAppRuntimePackDir)
+ <_CoreCLRRuntimePackDir Condition="'$(_CoreCLRRuntimePackDir)' == ''">%(ResolvedRuntimePack.PackageDirectory)
+ <_CoreCLRRuntimePackDir Condition="'$(_CoreCLRRuntimePackDir)' != ''">$([MSBuild]::NormalizeDirectory('$(_CoreCLRRuntimePackDir)'))
+
+
+
+ <_CoreCLRAppLocalAssembly Include="@(ReferenceCopyLocalPaths)"
+ Condition="'%(Extension)' == '.dll' and !$([System.String]::Copy('%(FullPath)').StartsWith('$(_CoreCLRRuntimePackDir)'))" />
+
+
+ <_CoreCLRAppLocalAssemblyNames>;@(_CoreCLRAppLocalAssembly->'%(FileName)%(Extension)');
+
+
+
+
+
+
+