Tewr / BlazorFileReader

Library for creating read-only file streams from file input elements or drop targets in Blazor.
MIT License
426 stars 61 forks source link

net6.0: UseWasmSharedBuffer=true is not supported on this platform #186

Closed catlan closed 2 years ago

catlan commented 2 years ago

Describe the bug When updating an existing project to net6.0 / ASP Core 6.0.1 I get this error in the console:

Unhandled exception rendering component: UseWasmSharedBuffer=true is not supported on this platform: Unable to acquire IJSUnmarshalledRuntime.
System.PlatformNotSupportedException: UseWasmSharedBuffer=true is not supported on this platform: Unable to acquire IJSUnmarshalledRuntime.
   at Tewr.Blazor.FileReader.FileReaderJsInterop.Initialize()
   at Tewr.Blazor.FileReader.FileReaderService..ctor(IJSRuntime jsRuntime, FileReaderServiceOptions options, IServiceProvider serviceProvider)
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, Object[] parameters, Boolean wrapExceptions)

Is this a bug or expected for net6.0?

Project type 'Client-side'/'CSB'

Environment

Tewr commented 2 years ago

Clearly unexpected, i didn't see anything like this in my tests. IJSUnmarshalledRuntime is not supposed to be used under .net6.

Is this a debug or release build?

Tewr commented 2 years ago

I've read the code, my .net6 test setup is clearly flawed. I'll try to fix this asap

catlan commented 2 years ago

Thx for the fast reply! It's a debug build.

Tewr commented 2 years ago

fixed in release v3.3.1.21360. Thanks for your help!