Author Topic: Internal compiler error  (Read 4127 times)

coolraiman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Internal compiler error
« on: May 26, 2014, 02:33:10 PM »
I have the standard NGUI license and when i try to import NGUI package in a 2d project i get this 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 only way to remove the error is to delete all c# files in the NGUI/Scripts/Editor folder

But i also loose all editor tools.

this error only happen in 2D project


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Internal compiler error
« Reply #1 on: May 26, 2014, 11:47:28 PM »
That error is somewhere in Mono. That doesn't make much sense to me. Do you have some DLLs in there that it's failing to load? The error isn't in NGUI according to the call stack, but is likely in the editor code.

coolraiman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Internal compiler error
« Reply #2 on: May 27, 2014, 08:02:52 AM »
when i updated unity to 4.3 mono somehow broke and i could not open it anymore (but everytime i try, a new processus is created)
i tried to download xamarin studio but i did not like the interface. (look like a mac software in my opinion)
So i reinstalled unity 4.3 and mono is now working again.
i linked the unity mono built-in again.

i am working in a rogue-like game and i used visual studio express (c#) to make the procedural generation of the dungeon as a dll (not using or linking in any way any unity library).

While i am writing this, i created a new 2D project and imported NGUI. you were right, my dll was the issue. but without ngui it work fine. (maybe you have a magic eye)
here is the assembly info of my dll:
[assembly: AssemblyVersion ("1.0.0.0")]
[assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCopyright ("Copyright ©  2014")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyFileVersion ("1.0.0.0")]
[assembly: AssemblyProduct ("dungGenerator")]
[assembly: AssemblyTitle ("dungGenerator")]
[assembly: AssemblyTrademark ("")]
[assembly: CompilationRelaxations (8)]
[assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)]
[assembly: ComVisible (false)]
[assembly: Guid ("152afd4f-7882-4e73-a90a-8f351e3a902b")]
[assembly: TargetFramework (".NETFramework,Version=v4.0,Profile=Client", FrameworkDisplayName = ".NET Framework 4 Client Profile")]
this is the release dll

everything was tested with a c# form and everything work fine with no memory leak or bug

i can use any classes and function in it with no problem. i really dont understand why i have this big error only when i import NGUI

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Internal compiler error
« Reply #3 on: May 28, 2014, 06:59:35 AM »
There may be a class naming conflict happening inside your DLL that conflicts with something in NGUI. That's about all I can guess.

Also note that installing an updated version of Mono is a bad idea, as Unity uses an older version. Unity has a custom version of MonoDevelop to go with it. Installing the updated Mono + MonoDevelop will only cause issues.