Skip to content
Latchkey

Blazor "Unable to find package Microsoft.AspNetCore.Components.WebAssembly" in CI

NuGet restore could not find the Blazor WebAssembly package on any configured feed at the requested version. The version usually does not match the runner SDK band, or nuget.org is missing from the sources.

What this error means

dotnet restore fails with "Unable to find package Microsoft.AspNetCore.Components.WebAssembly" (or a specific version of it) while a Blazor WASM project restores.

dotnet
error NU1101: Unable to find package Microsoft.AspNetCore.Components.WebAssembly.
Found 0 version(s) in the configured sources.
error : The package reference could not be resolved.

Common causes

The package version does not match the SDK band

Blazor WASM packages are versioned with the SDK. Pinning a version that the runner SDK does not ship leaves NuGet with nothing to resolve.

nuget.org is not in the configured feeds

A custom NuGet.config that omits nuget.org (or points only at a private feed) cannot resolve the public Blazor package.

How to fix it

Align the package version with the SDK

  1. Pin the SDK with global.json (for example 8.0.x).
  2. Let the Blazor project reference the matching framework package version.
  3. Restore again so NuGet resolves against the right band.
global.json
{
  "sdk": { "version": "8.0.400" }
}

Ensure nuget.org is a source

Add the public feed so framework packages resolve even with a private feed present.

Terminal
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org

How to prevent it

  • Keep the Blazor package version aligned with the pinned SDK.
  • Include nuget.org in NuGet.config alongside private feeds.
  • Commit global.json so CI uses a known SDK band.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →