You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Blazor sample application is not working with .NET 9 Preview 7. It gives me the following error:
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not set up parent class, due to: Could not load type of field 'SkiaSharp.Views.Blazor.Internal.JSModuleInterop:moduleTask' (0) due to: Could not resolve type with token 0100003b from typeref (expected class 'Microsoft.JSInterop.IJSUnmarshalledObjectReference' in assembly 'Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60') assembly:Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 type:Microsoft.JSInterop.IJSUnmarshalledObjectReference member:(null) assembly:SkiaSharp.Views.Blazor.dll type:JSModuleInterop member:(null)
System.TypeLoadException: Could not set up parent class, due to: Could not load type of field 'SkiaSharp.Views.Blazor.Internal.JSModuleInterop:moduleTask' (0) due to: Could not resolve type with token 0100003b from typeref (expected class 'Microsoft.JSInterop.IJSUnmarshalledObjectReference' in assembly 'Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60') assembly:Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 type:Microsoft.JSInterop.IJSUnmarshalledObjectReference member:(null) assembly:SkiaSharp.Views.Blazor.dll type:JSModuleInterop member:(null)
at SkiaSharp.Views.Blazor.SKCanvasView.OnAfterRenderAsync(Boolean firstRender)
This does not happen when targeting .NET 8 (and downgrading the ASP.NET Core Nuget dependencies Microsoft.AspNetCore.Components.WebAssembly and Microsoft.AspNetCore.Components.WebAssembly.DevServer to .NET 8).
Description
The Blazor sample application is not working with .NET 9 Preview 7. It gives me the following error:
This does not happen when targeting .NET 8 (and downgrading the ASP.NET Core Nuget dependencies
Microsoft.AspNetCore.Components.WebAssembly
andMicrosoft.AspNetCore.Components.WebAssembly.DevServer
to .NET 8).Skia Sharp Version
3.0.0-preview.4.1
Code
Expected Behavior
I expect the Blazor sample (https://github.com/mono/SkiaSharp/tree/main/samples/Basic/BlazorWebAssembly) to work as it does with .NET 8.
Actual behavior
Actual Behavior
The error shown in the description above and in the screenshot below appears.
Version of SkiaSharp
Other (Please indicate in the description)
Last Known Good Version of SkiaSharp
2.88.2 (Previous)
IDE / Editor
Visual Studio Code (Linux)
Platform / Operating System
Linux
Platform / Operating System Version
.NET 9 Preview 7
Kubuntu 24.04
x64
Firefox Browser 130.0
Edge Browser 128.0.2739.63
Devices
No response
Relevant Screenshots
Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: