New to Telerik UI for BlazorStart a free 30-day trial

TypeLoadException Could not Resolve Type with Token

Environment

ProductUI for Blazor

Description

This KB article discusses runtime exceptions that may occur in Blazor client-side WebAssembly apps and are similar to:

  • Unhandled exception rendering component: Could not resolve type with token ... from typeref (expected class 'Telerik.Blazor.Components...' in assembly 'Telerik.Blazor')
  • System.TypeLoadException: Could not resolve type with token ... from typeref (expected class 'Telerik.Blazor.Components...' in assembly 'Telerik.Blazor') at Microsoft.AspNetCore.Components.ComponentBase...(RenderTreeBuilder builder)

The error may occur after upgrading the version of .NET or Telerik UI for Blazor. The exact expected class and stack trace can differ.

Cause

Runtime type load or resolution errors are usually related to:

  • Application build cache
  • Browser WebAssembly cache

Solution

  1. Close Visual Studio.
  2. Delete all bin and obj folders in the app.
  3. Clear the browser cache.
  4. Restart Visual Studio and rebuild the app.

See Also