New to Telerik UI for Blazor? Start a free 30-day trial
TypeLoadException Could not Resolve Type with Token
Environment
Product | UI 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
- Close Visual Studio.
- Delete all bin and obj folders in the app.
- Clear the browser cache.
- Restart Visual Studio and rebuild the app.