Closed
Description
In #274 we've added a workaround for unsupported properties in WASM which swallows the PlatformNotSupported
exceptions.
We should add proper guards to avoid execution this part of the code completely when running on WebAssembly.
@bjorg, I've found this answer in a GitHub issue on "detecting if the code runs in WASM".
Could you please try if RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))
correctly detects your code running in WebAssembly? This way we could purposely avoid accessing these properties without swallowing exceptions...
Seems that from .NET 5 on we'll get a OperatingSystem.IsBrowser()
method to do just this, according to this article...
Metadata
Metadata
Assignees
Labels
No labels