.dll files not working with code when building

Hey everyone,

I finally finished my game in Unity! I tested the whole game in Unity and everything is working fine.

So I want to build my game into a standalone but then it all goes wrong…

I’m using 2 .NET libraries that are not included by default into the Mono Framework.

These 2 libraries are: System.Data and System.Drawing.

  • I need the System.Data to access my MS SQL Database.
  • I need the System.Drawing to generate an image from a Texture.

I have included both .dll files in my assets under the folder “plugin”. Both .dll files are copied from the Mono Framework. I found on this website I had to do it, in order to get them working with Unity. And this works perfect. But like I said: In Unity the libraries work fine.

The problem:

Once I build my project into a standalone application, it gives no errors. When I run my game the code that needs the new included libraries, nothing happens.

For example:

  • My SQL Connection doesn’t open.
  • The generated picture doesn’t save.

Here you can find a small log file from what is going wrong: [45948-output-log.txt|45948]

Anyone that can help me? Thanks!

Yours sincerely,


This fixed it: Use DLL in build version - Unity Answers