Unhandled Exception: System.Reflection.ReflectionTypeLoadException in Unity3d

Divya picture Divya · Mar 29, 2015 · Viewed 9.8k times · Source

I'm getting this error: compile time error when running i have searched on unity forum they are saying its for the System.Web.dll file issue, i have cleared that, also reimported assets but its still not working.

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 <filename unknown>:0 
  at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

the answers i got from unity are :

and none of them helped me.

Answer

Guavaman picture Guavaman · Apr 1, 2015

The problem is caused by the Unity.PackageManager.dll in your project. Delete that and it will be gone.

You've also got a folder under Editor that contains a bunch of editor scripts for Standard Assets, but you don't have Standard Assets Installed, so you're going to get a bunch of compiler errors from that. Delete the Editor folder or install Standard Assets and it will work.

I'm not sure where you got the tutorial files, but nothing in this project seems to work correctly. All the scenes are empty. I would advise you go find a different tutorial.