There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'
whugarra opened this issue · comments
I saw an example in blazor-server, but when I tried to use the library in blazor-wasm, I immediately received the above error as soon as I installed the package from nuget.
Hi @whugarra,
Thanks for taking your time to try this library. But I'm afraid it's not supported for blazor webassembly. You can use it in blazor server though.
Thank you very much for your quick reply.
Could you please give me some information about why it cannot be used in webassembly?
As you can see from the error message, the library relies on the Microsoft.AspNetCore.App
framework reference to render the razor view. This itself can run only on the server side using the ASP.NET Core runtime. As the blazor server runs on the server side using the same runtime, it works. Whereas blazor-wasm runtime runs on the browser and uses a different runtime tailored for the browser. Hence it won't run there.
I hope that it clarifies your question.
Thank you very much for your time and letting me understand the difference between the two frameworks!