- Home /
How can I get more information about this error: "The classes in the module cannot be loaded"?
My code compiles without error, but when I try and run my app in the editor, I'm "All compiler errors have to be fixed before you can enter playmode!"
The only error in the console is this:
Internal compiler error. See the console log for more information. output was: 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
which is not very helpful. I've checked that I'm targeting .net 3.5, and I don't see any DLLs that are out of place (the two most suggested steps that I've found). I've also tried reloading all assets, but that didn't help.
Is there any way to get more information about this error? It really doesn't tell me anything at all, other than that some module failed.
Any help would be greatly appreciated.
Thank you.
seems like a bug, all error code is zero (which is meaning okay).
try to load another project, if this error still appear, try to reinstall unity.
Other projects work fine, but this one still fails. Good thought, though.
did you have any plugins in your project (like UnityAds or something)?
Answer by pateras · Dec 25, 2014 at 11:14 PM
I solved this by copying over all of the DLLs I was including in the project into a separate Unity project, which then failed to start (predictably). I then removed them one by one until the error went away, which told me which DLL was having issues. I was then able to figure out what the issue with the DLL was (I was missing another, required DLL), with the help of a co-worker (thanks Larry!).
Your answer
Follow this Question
Related Questions
How to open an Editor Window by using the MethodInfo.Invoke function ? 1 Answer
Can custom editors that are built using Reflection.Emit be used in the Unity Editor? 1 Answer
missing files our project? 1 Answer
Alter Meshes in Editor by Script without warning 2 Answers
reflection propertyinfo.getvalue compiles fine but gives erros in editor 1 Answer