SaladLab / Json.Net.Unity3D

Forked Newtonsoft.Json to support Unity3D
MIT License
918 stars 169 forks source link

Could not load assembly 'Assembly-CSharp, Version=0.1.6240.32398' on Android #17

Closed ChrisMaire closed 7 years ago

ChrisMaire commented 7 years ago

This has been working great for me in editor, but on an Android device I got the following error: JsonSerializationException: Could not load assembly 'Assembly-CSharp, Version=0.1.6240.32398'

Is there something I need to do to get the dll to work on Android? My API compatibility level is set to .NET 2.0 and this is in Unity 5.4 building for Android 7.

ChrisMaire commented 7 years ago

This was being caused by some serialization settings I was using; TypeNameHandling.All was forcing the serializer to try and load some Windows only assemblies. Switching to TypeNameHandling.Auto resolved it.