This project has moved and is read-only. For the latest updates, please go here.

Internal Compiler Error when using compiled DLLs.

Topics: 3rd Party Libs, Host Development, Newbie
Nov 4, 2013 at 9:09 PM
Hello, I'm trying to integrate VST effects into Unity3D, but I keep getting this error when Unity tries to compile. Does anybody recognize this error or is it just a Unity only thing? I've traced Mono.CSharp down to a method that replaces built-in types with Unity types, but I'm not sure if that would cause this. Thanks!!
~Jake
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
Nov 5, 2013 at 12:26 AM
Yes, definitely mono related, not unity and VST.Net.
Nov 5, 2013 at 3:11 AM
That's good news! So should I try to modify the Mono source code or is there a better way to fix it?

Thanks!
Nov 5, 2013 at 3:19 AM
Edited Nov 5, 2013 at 3:23 AM
Maybe have a look at the 'console log' as hinted in the exception stack trace to get the name of the assembly being reflected (filename unknown?). Vst.Net and Unity both use assemblies with ties to native code (pinvoke), how does mono support this feature? The 'wrapper managed-to-native' throwing error suggest a lack of compatibility with low level datatypes but I can't tell more just from this.
Nov 5, 2013 at 5:16 AM
That was extremely helpful, thank you! I discovered the error was Mono using .NET 3.5 but the version of VST.NET was 4.0, so i switched to the 2.0 DLLs and I'm currently getting no errors ^_^