How to fix Application.LocalUserAppDataPath in the .NET browser-wasm runtime?

27 Views Asked by At

I have some existing code which accesses Application.LocalUserAppDataPath which I am porting to .NET's browser-wasm runtime.

Dim sPath As String
sPath = Application.LocalUserAppDataPath
If Not IO.Directory.Exists(sPath) Then IO.Directory.CreateDirectory(sPath)

In browser-wasm this property appears to be an empty string, which breaks the code using it (CreateDirectory throws "The value cannot be an empty string.").

What can I do so that it returns something sensible?

0

There are 0 best solutions below