This assembly can cause crashes in the runtime

Hello,

I recently added GemBox.Spreadsheet.dll from https://www.gemboxsoftware.com/spreadsheet
to our project. However I get this error below

Unloading broken assembly Assets/Plugins/Editor/WobblyDialogExporter/GemBox.Spreadsheet.dll, this assembly can cause crashes in the runtime

Any idea why, the .dll is functioning fine and it’s working. But there is obviously something wrong.

Kind regards,
Tom

If I recall correctly the most common cause is if you use a DLL that is built against a different / unsupported version of .NET (perhaps .NET Core?). See here for supported versions: Unity - Manual: .NET profile support

Another cause might be, but I’m guessing here, if the DLL makes use of platform-specific types such as Windows.Drawing or such .NET types that Unity does not support on all platforms, typically something like networking or encryption. But I don’t know if the inspection goes that deep, I actually don’t think so. Nevertheless such a DLL would definitely cause runtime crashes (exceptions).

Such a DLL may also cause IL2CPP builds to fail.

In the editor most DLLs work. But … have you made builds and tested it on all supported platforms? :wink:

And did you exercise all of the DLL functionality that you need? It may not start to show issues until you use certain functionality.

On the other hand, everything could be fine to use for certain functionality you need even though the DLL isn’t fully compatible. But this is always risky particularly when you learn later in development that you need to use feature X but that’s the one that is going to cause a crash.

If at all possible try to get the source of the project and build a DLL yourself, this way you can control which framework version to compile against and so on.

Thanks, I assumed this was the case. Just wanted to check with another dev.