Error when try to use InMemory Database in .net maui

Open an in memory database with .net maui on WinUI generates the following error:

System.InvalidOperationException: “Could not determine a writable folder to store the Realm file. When constructing the RealmConfiguration, provide an absolute optionalPath where writes are allowed.”

Tried to use the preserv static class but does not help. The same code is working on Android without the error.

Hmmm - you may want to open an issue here and provide some environmental details -

upgrading to the latest version 10.21.1 solved the problem