Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

I am using Unity Pro 5.3.4 and OS X 10.10.5.
I suddenly started getting a System.Reflection error. I updated to 5.3.4 a couple days ago and everything was working until this morning when I got to work I was getting these errors:

The following assembly referenced from This was a file path I removed for privacy reasons/Plugins/Newtonsoft.Json.dll could not be loaded:
Assembly: System.Runtime.Serialization (assemblyref_index=6)
Version: 3.0.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (This was a file path I removed for privacy reasons).

Could not load file or assembly ‘System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies.
The following assembly referenced from This was a file path I removed for privacy reasons/Newtonsoft.Json.dll could not be loaded:
Assembly: System.Xml.Linq (assemblyref_index=5)
Version: 3.5.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (This was a file path I removed for privacy reasons).

**I was able to fix the errors above by putting System.Xml.Linq.dll and System.Serialization.dll in the folder with the plugin. I was not able to find these on my Mac system though. I had to copy it from an installation of Unity on Windows. It just seemed like MonoDevelop couldn’t find what it was looking for. I don’t know how to fix the following error. **

**I tried the answer here but I am not using any services and this did not work. **

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0
at Mono.CSharp.Driver.Compile () [0x00000] in :0
at Mono.CSharp.Driver.Main (System.String args) [0x00000] in :0

The class System.ComponentModel.INotifyPropertyChanging could not be loaded, used in System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class System.ComponentModel.AddingNewEventHandler could not be loaded, used in System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class JTokenReferenceEqualityComparer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class JPropertyList could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JArray could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JObject could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Linq.JProperty could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d__42 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed The class <Convert>d__f2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d__0 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d__2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class d__0 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class <>c__DisplayClass2 could not be loaded, used in Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

Try reading this thread. It seems it may offer a solution or a way to find a solution.

http://forum.unity3d.com/threads/ideas-reflectiontypeloadexception-the-classes-in-the-module-cannot-be-loaded.230389/

Newtsoft’s JSON is known to have issues with Unity. In the package you download for Newtonsoft’s JSON there should be several different builds along with the source.

I solved this issue before by using the .NET 2.0 version of Newtonsoft’s JSON.

Also make sure that you’re using an Api Compatibility Level of .NET 2.0 (not subset).
You can do this by going to your Player Project Settings → Standalone Settings → Other Settings → Optimization → API Compatibility Level.

It went away almost as mysteriously as it arrived. I copied it from one folder on another computer and put it on my desktop and it worked again… I have no idea.

I fix this by switching platform from WebPlayer to Android…

I was facing the same problem while using LitJson with unity 5.0 I tried by changing from .Net subset to .Net 2 but still it was giving me an error. At last, I Delete LiJson.dll and download another version from the different website and it fixed a problem for me

Hi…

This issue can be resolved by re-installing unity3d.