C#C
C#3y ago
riot_time

❔ .net 7 to web assembly help

I have seen the new .net 7 webassembly experimental tool and wondered if I can use it in my project.

I have a C# server that gets an image (from a FormData) and returns a barcode (if present) from the image using the IronBarcode lib.

I tried to move this method to the experimental tool of webassembly, and it I have got a bunch of errors trying to JSExport my method (pic 1 -- making it static didn't help either), so I guessed changing it to none async function will solve that (although it was explained in this demo that Tasks can be exported).
As I though it worked and no build errors was thrown, but still I got no luck running the function (pic2), since in the browser it self I got this error (pic3) which made wondering - what are the limitations of compiling .net 7 to webassembly (maybe some nugets cannot be compiled to webassembly?).
Any help would be appreciated
2.png
3.png
Screenshot_2023-01-162_013652.png
Was this page helpful?