From f1b6cdd821395586144434acb6d7af5994724d5f Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Wed, 11 Feb 2026 12:47:11 -0600 Subject: [PATCH] Fix browser-wasm test restore NU1102 failures After UseMonoRuntime was removed from in-tree wasm props (PR #121789), test restores for browser-wasm fail with NU1102 because the SDK tries to download runtime packs that don't exist on NuGet. The test restore only needs NuGet package references - runtime packs come from the local build and are wired up separately during test build. Fix: Unconditionally disable runtime and targeting pack downloads during test dependency restore, since they are never needed from NuGet. --- src/tests/build.proj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/build.proj b/src/tests/build.proj index 79065c98a1d9c4..d3629a6857e6de 100644 --- a/src/tests/build.proj +++ b/src/tests/build.proj @@ -209,9 +209,9 @@ <_ConfigurationProperties>/p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:Configuration=$(Configuration) /p:CrossBuild=$(CrossBuild) - <_ConfigurationProperties Condition="'$(UseLocalAppHostPack)' == 'true'">$(_ConfigurationProperties) -p:EnableAppHostPackDownload=false -p:EnableTargetingPackDownload=false -p:EnableRuntimePackDownload=false + <_ConfigurationProperties Condition="'$(UseLocalAppHostPack)' == 'true'">$(_ConfigurationProperties) -p:EnableAppHostPackDownload=false <_ForceRestore Condition="'$(_ForceRestore)' == 'true'">-f - "$(DotNetTool)" restore $(_ForceRestore) -r $(RuntimeIdentifier) $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true /p:RuntimeIdentifier=$(RuntimeIdentifier) $(_ConfigurationProperties) + "$(DotNetTool)" restore $(_ForceRestore) -r $(RuntimeIdentifier) $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true /p:RuntimeIdentifier=$(RuntimeIdentifier) -p:EnableTargetingPackDownload=false -p:EnableRuntimePackDownload=false $(_ConfigurationProperties)