Background: I’m very, very, very new to C# and Unity.
I’m trying to use the NSubstitute framework in my project. I have dll and xml files (taken from the library’s NET35 directory) in Assets/Plugins. MonoDevelop seems to be happy with it, but the Unity editor gives me an internal compiler error:
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 <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 Editor.log file shows a bunch of complaints about being unable to load various System.ComponentModel and Castle classes.
I’ve looked up solutions for similar problems, and they tend to suggest messing with the .net compatability in player settings, but that didn’t seem to help. The log file does seem to suggest that is where the problem lies, however, so maybe I just wasn’t messing with the right settings.
Any and all help would be awesome.