Unity with a .NET 3.5 dll

Hi, I have been using Unity with a C# .NET 3.5 dll and everything has been working fine so far. I reference the dll in Unity by adding it as an asset.

I recently added some serialization to my dll and I needed to reference System.Runtime.Serialization there. Now in Unity, I'm not able to load my dll anymore because of this error ...

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization, Version=3.0.0.0, ... etc.

Am I going out of bounds here or should I be able to do this?

Thanks --Andy

Could you post the whole of the error message? Unity does come with a System.Runtime.Serialization DLL, so the checksum could be the problem.

1 Answer

1

Hi, I answered my own question. I changed the Edit > Project Settings > Player > Optimization to be the full .NET2.0 and not the subset.

This is similar to this answer ... link text