Using mongoDB driver versions 2.5+ in Unity3D

68 views
Skip to first unread message

Robert Klausch

unread,
Oct 24, 2018, 6:57:14 AM10/24/18
to mongodb-user
Hello Everyone!

I'm currently using the .NET driver 2.4.4. in a Unity3D project for persisting game states.

These driver version works fine here, but when i'm trying to upgrade the driver to v 2.5.1 or higher i'm getting the following Unity3D compiler error:

"Unloading broken assembly Assets/net45/MongoDB.Driver.Core.dll, this assembly can cause crashes in the runtime"

Unity experts told me, that this is caused by a missing external reference in the project.

So i'm wondering, which external assembly the compiler is looking for MongoDB.Driver.Core.dll from version 2.5.1 on.

Any ideas?

Thanks in advance!


Robert Klausch

unread,
Oct 24, 2018, 7:20:11 AM10/24/18
to mongodb-user
i found a solution for the mentioned problem above by compiling my own driver directly from the source, which actually is containing two more referenced dll's ( in my case this is DnsClient.dll and System.Buffers.dll) which seems to be not getting referenced by the newer driver versions and are not natively referenced into a Unity3D project by itself. On the other hand, they are not included in the driver package for some reasons.

New driver runs perfectly now. :)
Reply all
Reply to author
Forward
0 new messages