❔ Realm .NET Error

I need help with Realm .NET. I'm making a plugin for unity game and I have server hosted on linux and I'm making a plugin on windows 10. Here's sample of my code:
public async Task MongoDBConnect()
{
var app = App.Create("my-realm");

var user = await app.LogInAsync(Credentials.Anonymous());

var mongoClient = user.GetMongoClient("mongodb://user:password@ip:port/&authSource=admin&connectTimeoutMS=1000&socketTimeoutMS=1000&serverSelectionTimeoutMS=1000");
var database = mongoClient.GetDatabase("db");
collection = (IMongoCollection<PlayerModel>)database.GetCollection<PlayerModel>("playerdatas");
}
public async Task MongoDBConnect()
{
var app = App.Create("my-realm");

var user = await app.LogInAsync(Credentials.Anonymous());

var mongoClient = user.GetMongoClient("mongodb://user:password@ip:port/&authSource=admin&connectTimeoutMS=1000&socketTimeoutMS=1000&serverSelectionTimeoutMS=1000");
var database = mongoClient.GetDatabase("db");
collection = (IMongoCollection<PlayerModel>)database.GetCollection<PlayerModel>("playerdatas");
}
And this code (excatly App.Create) is throwing this error:
System.TypeInitializationException: The type initializer for 'Realms.Sync.AppHandle' threw an exception. ---> System.DllNotFoundException: realm-wrappers
at (wrapper managed-to-native) Realms.SynchronizationContextScheduler.install_scheduler_callbacks(Realms.SynchronizationContextScheduler/get_context,Realms.SynchronizationContextScheduler/post_on_context,Realms.SynchronizationContextScheduler/release_context,Realms.SynchronizationContextScheduler/is_on_context)
--- End of inner exception stack trace ---
System.TypeInitializationException: The type initializer for 'Realms.Sync.AppHandle' threw an exception. ---> System.DllNotFoundException: realm-wrappers
at (wrapper managed-to-native) Realms.SynchronizationContextScheduler.install_scheduler_callbacks(Realms.SynchronizationContextScheduler/get_context,Realms.SynchronizationContextScheduler/post_on_context,Realms.SynchronizationContextScheduler/release_context,Realms.SynchronizationContextScheduler/is_on_context)
--- End of inner exception stack trace ---
and actually error says about missing realm-wrappers.dll, and problem is that it's generating only files for windows (x64 and x86). What I can do in that situation?
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server