Skip to content

Fix browser-wasm test restore NU1102 failures#124288

Merged
lewing merged 1 commit intodotnet:darc-main-e2f5167c-e029-48f9-9320-5da37ced6868from
lewing:fix/browser-wasm-restore-runtimeflavor
Feb 11, 2026
Merged

Fix browser-wasm test restore NU1102 failures#124288
lewing merged 1 commit intodotnet:darc-main-e2f5167c-e029-48f9-9320-5da37ced6868from
lewing:fix/browser-wasm-restore-runtimeflavor

Conversation

@lewing
Copy link
Member

@lewing lewing commented Feb 11, 2026

Problem

After UseMonoRuntime was removed from in-tree wasm props (PR #121789 by @maraf), browser-wasm test restores fail with NU1102 (package not found).

The RestorePackage target in build.proj runs dotnet restore for test dependency projects. These projects use Microsoft.NET.Sdk (not the WebAssembly SDK), so UseMonoRuntime is not set. Without it, the newer SDK tries to download Microsoft.NETCore.App.Runtime.browser-wasm (CoreCLR pattern) or Microsoft.NETCore.App.Runtime.Mono.browser-wasm from NuGet — packages that don't exist for .NET 11.

The test restore doesn't need runtime or targeting packs from NuGet — those come from the local build and are wired up during the test build step. However, EnableRuntimePackDownload=false and EnableTargetingPackDownload=false were only passed conditionally (when UseLocalAppHostPack=true), and browser-wasm sets UseLocalAppHostPack=false.

Fix

Unconditionally pass -p:EnableRuntimePackDownload=false -p:EnableTargetingPackDownload=false to the test dependency restore command. This fixes both Mono and CoreCLR browser-wasm configurations since neither needs pack downloads during restore.

Context

cc @maraf @akoeplinger

Copilot AI review requested due to automatic review settings February 11, 2026 18:47
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 11, 2026
@lewing lewing changed the base branch from main to darc-main-e2f5167c-e029-48f9-9320-5da37ced6868 February 11, 2026 18:49
@lewing lewing added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Feb 11, 2026
@lewing
Copy link
Member Author

lewing commented Feb 11, 2026

testing analysis

@lewing lewing added area-skills Agent Skills and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Feb 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes browser-wasm test restore failures (NU1102) by ensuring restores and local targeting pack resolution correctly account for runtime flavor and the browser-wasm RID, alongside a broader codeflow/dependency/tooling update.

Changes:

  • Pass RuntimeFlavor into the dotnet restore invocation for test restores.
  • Add browser-wasm to the CoreCLR RuntimePackRuntimeIdentifiers list used for local targeting/runtime pack resolution.
  • Update pinned SDK/dependency versions and adjust shared eng/CI scripts/templates (pool images, native deps).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/tests/build.proj Adds conditional /p:RuntimeFlavor=... to the restore command used by test builds.
eng/targetingpacks.targets Extends CoreCLR runtime pack RID list to include browser-wasm for local pack resolution.
global.json Updates pinned SDK/tooling and MSBuild SDK versions.
eng/common/templates/variables/pool-providers.yml Updates example pool image reference (comment-only change).
eng/common/native/install-dependencies.sh Installs Ninja across supported OS/distro paths.
eng/common/cross/build-rootfs.sh Adjusts LLDB package selection for Ubuntu 24.04 (noble).
eng/common/core-templates/post-build/post-build.yml Moves publishing pools from windows.vs2019 to windows.vs2022 images/demands.
eng/common/core-templates/job/source-build.yml Updates source-build pool selection to Azure Linux 3 images/demands.
eng/common/core-templates/job/publish-build-assets.yml Moves publishing pools from windows.vs2019 to windows.vs2022 images.
eng/Versions.props Bumps prerelease iteration.
eng/Version.Details.xml Updates codeflow source SHA and multiple dependency versions.
eng/Version.Details.props Updates corresponding dependency version properties.

After UseMonoRuntime was removed from in-tree wasm props (PR dotnet#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.
@lewing lewing force-pushed the fix/browser-wasm-restore-runtimeflavor branch from 09f96e9 to f1b6cdd Compare February 11, 2026 19:21
@lewing lewing removed the NO-REVIEW Experimental/testing PR, do NOT review it label Feb 11, 2026
@lewing
Copy link
Member Author

lewing commented Feb 11, 2026

it looks like it was added in net8 tfm bump #78354
image
then the code changed a bit.

@lewing lewing marked this pull request as ready for review February 11, 2026 20:03
@lewing
Copy link
Member Author

lewing commented Feb 11, 2026

I'm going to merge it into the vmr flow since ci isn't running here

@lewing lewing merged commit 25d8826 into dotnet:darc-main-e2f5167c-e029-48f9-9320-5da37ced6868 Feb 11, 2026
13 of 15 checks passed
lewing added a commit that referenced this pull request Feb 12, 2026
The previous fix (PR #124288) made EnableTargetingPackDownload=false and
EnableRuntimePackDownload=false unconditional for all platforms. This broke
coreclr/NativeAOT/Libraries test restores that need those packs from NuGet.

Fix: Add 'or TargetOS==browser' to the existing UseLocalAppHostPack condition
instead of making the flags unconditional. This fixes browser-wasm NU1102
while preserving original behavior for all other platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-skills Agent Skills NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants