Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Ideas? ReflectionTypeLoadException: The classes in the module cannot be loaded.

Discussion in 'Editor & General Support' started by MaryInvents34, Feb 24, 2014.

  1. MaryInvents34

    MaryInvents34

    Joined:
    Aug 28, 2013
    Posts:
    15
    Hi,

    I've got a .net 3.5 assembly which encounters the following error when Unity tries to import it:

    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.

    It's a standard kind of error and doesn't point to which class is the issue (If only it did). The assembly in question contains data service contracts, a few interfaces, a few little classes and not much meat. It references NLog, NInject, System.Runtime.Serialization, System.ServiceModel and System.Xml. These assemblies are in the unity solution and have been imported without issue.

    But when I bring in my contracts assembly, I get the error noted above. I'm pulling my hair out. In Visual Studio, it compiles without errors and without any warnings. It doesn't use any unmanaged code, but there is some manipulation of IQueryable going on. Generic interfaces and classes? Quite a few, but none of them are open generics. FxCop does not complain.

    The assembly is relatively large, well large enough that it's not feasible to start stripping out classes looking for unsupported features.

    I've created a test assembly, which has the same references, and one of each funky language feature. The test assembly can be imported without any issues.

    Has anyone come across features which *should* work, but don't?
    Alternatively, any ideas for diagnostics inside Unity? Possibly fusion logs for Unity?

    Any ideas are welcome.
     
    Last edited: Feb 24, 2014
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,665
    Is it possible that one or more of the assemblies you're using were built against CLR 4? Unity only supports CLR 2 assemblies.
     
  3. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    My guess is that either the assembly is compiled for too high a version of .NET (4.0+ instead of 3.5) or there are unsupported types in the assembly. I'd guess that most likely though it's the first option.
     
  4. MaryInvents34

    MaryInvents34

    Joined:
    Aug 28, 2013
    Posts:
    15
    Nope, that's not it. The assembly is compiled for .net 3.5. I wish it were that simple.
     
  5. MaryInvents34

    MaryInvents34

    Joined:
    Aug 28, 2013
    Posts:
    15
    Insert forehead slap, ID=10T, pebcak, which ever way you'd like to say it. I figured it out and for those who might be debugging similar issues, here's the autopsy report:

    NLog wasn't in the Unity project and rather than giving a error message about a missing assembly (which occurs in some cases), I received the error noted above.

    Logger is being exposed via a method on one of my interfaces, which (I guess) is why there is a ReflectionTypeLoadException as opposed to a MissingAssemblyException or FileNotFoundException. I wish the exception details were written to the console.

    To find this, I copied all of the code to another VS project and started wholesale deleting folders classes until the assembly could be imported correctly. Then I started adding back classes until I found the culprit. I was expecting the error to come from the expression visitor classes or something like that. Nope, it was one little code element on a utility class.

    They say in Formula 1 that it's the 20 cent part which loses the race.
     
  6. dkely

    dkely

    Joined:
    Mar 3, 2014
    Posts:
    22
    Great thanks! I had another issue and was slowly adding libraries in to fix it when i cam across this problem. Previously, it would say the library that was missing to support the one i just added, so i was expecting that message. When i got this, i assumed i was somehow using reflection and spent too long looking trying to find where.
     
  7. truefx001

    truefx001

    Joined:
    Jan 30, 2013
    Posts:
    132
    I know this is a old post but maybe someone can help me with that, I upgraded my project to Unity5 and had to get rid off some stuff in the standard folder and some assets after this I was able to compile the project and run it in the editor environment to a point where I knew it would be difficult because of a large city being loaded , I decided to build and run it for Win 64 and got the error message 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

    maybe someone can help me with that.
    Thanks in advance
    Zvonko
     
    metaldc4life and xw132456 like this.
  8. laryk_ua

    laryk_ua

    Joined:
    Jul 26, 2014
    Posts:
    9
    Go to "Edit->Project Settings->Player-> Other settings" and set "Api Compatibility Level" to ".NET 2.0" instead of ".NET 2.0 Subset".
     
  9. truefx001

    truefx001

    Joined:
    Jan 30, 2013
    Posts:
    132
    Hi laryk_ua,
    It is set to Net 2.0
    What it solved for me was that I had to deleted asset by asset and than it started to compile BUT my cityscene which is the
    largest of the scenes and 3rd in the row of scenes crashes the game in editor or as compiled application with 0x000008 access violation error
     
  10. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I'm starting to get weird occasional errors like this in Unity 5.
    Seems related to compiled dll's but I'm not 100% sure yet.

    Doesn't give you much real information when the project suddenly goes haywire.
     
    Aelcyx likes this.
  11. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,202
    I'm getting these types of errors as well when clicking on any object (in scene or project hierarchy) that has an inspector (for example an empty gameobject in the scene).

    Here are the two errors:
    ReflectionTypeLoadException: The classes in the module cannot be loaded.
    System.Reflection.Assembly.GetTypes () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/Assembly.cs:371)
    UnityEditor.Events.InterceptedEventsPreview.GetEventsInfo (UnityEngine.GameObject gameObject) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/InterceptedEventsPreview.cs:162)
    UnityEditor.Events.InterceptedEventsPreview.Initialize (UnityEngine.Object[] targets) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/InterceptedEventsPreview.cs:61)
    UnityEditor.InspectorWindow.GetPreviewsForType (UnityEditor.Editor editor) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:293)
    UnityEditor.InspectorWindow.CreatePreviewables () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:261)
    UnityEditor.InspectorWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:323)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
    Aborting
    UnityEngine.GUILayoutGroup.GetNext () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/GUILayoutUtility.gen.cs:511)
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/GUILayoutUtility.gen.cs:208)
    UnityEditor.EditorGUILayout.BeginVerticalScrollView (Vector2 scrollPosition, Boolean alwaysShowVertical, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6636)
    UnityEditor.EditorGUILayout.BeginVerticalScrollView (Vector2 scrollPosition, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6630)
    UnityEditor.InspectorWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:331)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    So far it hasn't stopped me from doing anything, it's just annoying (although I haven't tried a build yet). Anyone have an idea on this? Again, I'm not writing any sort of custom inspector or GUI code.

    Edit: I am also getting this console log when I enter play mode:
    Code (CSharp):
    1. SpritePacker failed to get types from Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. Error: The classes in the module cannot be loaded.
    2. UnityEditor.Sprites.Packer:GetSelectedPolicyId()
     
    corcusftw likes this.
  12. ArtR

    ArtR

    Joined:
    Sep 27, 2011
    Posts:
    48
    Super old post but I will reply in case it's useful for anyone. On unity 5 I was getting this message after checking "Preload Shaders" in the build settings. Checked it off and it's gone. Maybe not the actual issue in this case, but something to keep in mind?
     
  13. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,202
    Any piece of advice is good advice, it never hurts to try different things!

    In my case, I believe one of my scripts became corrupted, or else there was something in the code that was causing the issue. I duplicated my projected and started removing scripts until the error disappeared. I have no idea why this happened, but if anyone is seeing the two errors I posted above, try duplicating your project and then going through your scripts and try either removing them or commenting out all the code until the error disappears.
     
  14. Ox_

    Ox_

    Joined:
    Jun 9, 2013
    Posts:
    93
    For me it was selecting NET 2.0 instead of subset and then reloading the project.
     
  15. CharlieBrown

    CharlieBrown

    Joined:
    May 11, 2015
    Posts:
    10
    I am having exactly the same problem. I try to load "System.ServiceModel" ( from framework 3.0 ) with last version of Unity 5.f.1 with NET2.0 and no "preload shared" and do not works...:S
     
  16. LtKelleyUSMC

    LtKelleyUSMC

    Joined:
    Oct 6, 2012
    Posts:
    45
    Well, here comes my $0.02.
    My version of Unity is: 5.0.0f4
    I created an FTPMANAGER.DLL in Visual Studio, then put it in my Plugins folder, and sure enough, this same error that you all are talking about happens to me. My initial objective was to be able to download a text file, which keeps track of objects in this 3DWorld, from my Internet server, into the webplayer. The idea was to add an object (in game), to this world, save it, then upload the Objects.txt file, to the Internet server, and then, when starting the game again, download this files to the WebBrowser, so that it could place the objects (Prefabs) into the world, so that the game would remember all the objects that have been added to the world.
    When I take this FTPMANAGER.DLL out of the Plugins folder, the error GOES AWAY, but whenever I add it back, the error shows up... Go figure.
    All I have in this new project, is the Standard Assets, a Terrain, and the First Person Controller, just as a basic world, just so I could see what it going on with this stuff...
    I have changed the
    "Edit->Project Settings->Player-> Other settings" and set "Api Compatibility Level" to ".NET 2.0" instead of ".NET 2.0 Subset", as laryk_ua talks about, but still getting this same error.
    Obviously, this DLL is going to be only for the WEB (or at least for PC), but who knows.
    Perhaps this is a bug in UNITY5.
    ===============================
    AH HAAAAA. Found this answer now... When dropping this FTPMANAGER.DLL into the Plugins folder, I clicked on it, then changed the FTPMANAGER IMPORT SETTINGS under PLATFORM SETTINGS to the following:
    CPU : X86
    OS : Windows...
    So it seems this error has gone away now. We'll see if I get to move forward with my programming now... YEP, just testing the game, and it actually starts. Now to create a C# script in Unity, to see if I can download this Objects.txt into the webbrowser player...We'll see again...
     
    Last edited: Aug 8, 2015
  17. LtKelleyUSMC

    LtKelleyUSMC

    Joined:
    Oct 6, 2012
    Posts:
    45
    As programming goes, here's an update (Visual Studio 2013)
    I went and changed the code in my FTPMANAGER C# source code, and removed the
    using System.Threading.Tasks;
    and recompiled it, then dragged it back into Unity5, and the error DID NOT show it's ugly face.
    I did not have to change the CPU or OS under Platform Settings (in Unity IMPORT SETTINGS), although I will need to do this, since it won't be for Mac, LINUX, Android, etc. That will be in another world... LOL
    So, now, let's see if I can actually get this to work... 'twould be nice to see this
     
    Last edited: Aug 8, 2015
  18. corcusftw

    corcusftw

    Joined:
    Aug 7, 2015
    Posts:
    4
    I too am facing the same error. I have a very simple project no assets at all other than two dlls. TestPlugin.dll in Plugins folder and another TestPlugin.dll in Plugins/WSA folder. If I change the cpu targets and os the error does go away but I cannot use the TestPlugin in any script because it says that it cannot find it. Is this indeed a bug with unity 5?
     
    gregroberts likes this.
  19. skalev

    skalev

    Joined:
    Feb 16, 2012
    Posts:
    264
    I've recently encountered this issue when updating some packages which included DLL files, along with updating Unity's version.

    In my case, the issue was resolved by re-importing all DLL files.
     
  20. AlfAtUnity

    AlfAtUnity

    Joined:
    Jun 27, 2013
    Posts:
    4
    I experienced same error. It was caused by Parse plugin 1.5.5. After deleting Parse error is gone. P.S. Why I needed that? What professional developer will use it?
     
  21. darthzedi

    darthzedi

    Joined:
    Jul 26, 2015
    Posts:
    2
    I had the same Issue which was resolved after deleting the uSequencer files that I had imported.
     
  22. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    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 following assembly referenced from G:\unity5.2\System Of TopDown\Assets\addme\Demigiant\DOTween\DOTween46.dll could not be loaded:
    Assembly: UnityEngine.UI (assemblyref_index=4)
    Version: 1.0.0.0
    Public Key: (none)
    The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (G:\unity5.2\System Of TopDown\Assets\addme\Demigiant\DOTween\).

    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
    Could not load file or assembly 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
     
  23. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    That ones pretty clear. Either the UnityEngine.UI assembly is missing from your project or something is wrong with it and DotTween references it so DotTween can't be loaded.
     
    Last edited: Nov 1, 2015
  24. gregroberts

    gregroberts

    Joined:
    Nov 21, 2014
    Posts:
    25
    That worked perfectly for us. Thank you!

    Oculus Rift / HTC Vive / PSVR dev
    http://dsky.co
     
  25. Tecnophobe

    Tecnophobe

    Joined:
    May 8, 2015
    Posts:
    3
    This was my problem. Thanks.
     
    Dustin-Horne likes this.
  26. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Same issue: Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.

    • Created C# DLL with 2.0 .NET framework.
    • One generic string method returning "".
    • Removed all Using's.
    • Referenced UnityEngine.dll correctly. Builds correctly.
    • Set Unity preferences as 2.0 .NET instead of subset.
    Any ideas guys?
     
  27. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,948
    Check the Editor.log, it will specify which dependencies cannot be found
     
  28. kadho

    kadho

    Joined:
    Aug 21, 2014
    Posts:
    5
    *It appears this can happen in Unity 5.3x+ if you enable IAP, import the files, and then at any point if the organization link gets broken somehow, this seems to happen. After re adding my organization and linking and re importing, it started working. Cheers!

    For me this began after importing the new Unity IAP plugin from services. It worked great for a couple of days. Then I opened unity and could not get rid of this error until deleting the plugin. I notice that the plugin hierarchy deviates from the STANDARD SET naming convention, as now you can select a file and designate its intended platform and architecture, but is it possible there is a bug in this?

    What is more interesting is, I had my entire team pull from the repo so they would have exactly what I have, and none of them had the issue.

    For the record, my platform settings are set to iOS, and this isn't as far along as a build issue, I cannot even play in the editor any longer.
     
    Last edited: Feb 1, 2016
    Symyon likes this.
  29. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Importing the new IAP plugin also seems to break my asset for some reason as well which I'm working on getting details for, but it could be related. There may be a bug with the IAP plugin.
     
    Symyon likes this.
  30. allenwp

    allenwp

    Joined:
    Sep 4, 2013
    Posts:
    46
    Using Unity 5.3.4p3 I was having this problem. Uninstalling Unity and installing Unity 5.3.4p5 fixed the problem. I believe it was not the update, but instead the re-install that fixed the problem because 5.3.4p3 was working correctly previously. The problem appeared to come up after I was having problems moving a folder inside of Assets (Unity would hang with full CPU usage after trying to move the folder).

    (From looking at the "fixes" to this problem, a similar error message can be caused by a number of different internal Unity problems...)
     
  31. assimoes

    assimoes

    Joined:
    May 31, 2016
    Posts:
    7
    Love you man.
     
  32. CollosalChris

    CollosalChris

    Joined:
    Mar 17, 2014
    Posts:
    13
    As others have said this error is often related to DLLs. I got this error when I updated Unity and did not update the Windows Build Support losing my ability to switch my platform to Windows. Once I started the Unity Updater and added support for Windows and switched my platform things were hunky dory
     
  33. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    I got similar issue when I followed the official doc trying to create a very simple managed plugin (dll) using Unity 5.3.4p5/MonoDevelop on Mac.

    Copy the error message here.
    I believe I built the dll with .net 4.0.5 as per the MonoDevelop-Unity -> Preference -> Projects -> .Net Runtimes. I suspect this might cause the issue but not sure how to change it.

    Any ideas?

    Thanks,
    Devon
     
  34. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    I was able to make it work now.
    In MonoDevelop -> Menu: Project -> Edit References -> .Net Assembly -> Remove the reference System.

    Rebuild and reimport the dll into my Unity project. The error was gone.

    For this very simple dll it works. Hopefully it will work when it goes more complicated.

    Cheers,
    Devon

     
  35. EJSainz

    EJSainz

    Joined:
    Mar 24, 2015
    Posts:
    30
    For all of you that may have the same problem as me.

    I have noticed that Unity Services does disconnect from time to time. When that happens, lots of classes are no longer available and I may get this "ReflectionTypeLoadException: The classes in the module cannot be loaded" error.

    Even after closing Unity Editor and restarting the error will be there.

    My solution was very simple: opening the services tab and moving the cursor over the On/Off buttons. At the beggining, these buttons are grayed OFF, but as I move the cursor over the buttons turn ON and, after a few seconds, Unity reloads all the scripts without error.

    Yep, sounds strange, but it does the trick for me. I'm on Windows, Unity 5.3.5f1 .
     
    monstronauts likes this.
  36. monstronauts

    monstronauts

    Joined:
    Feb 15, 2016
    Posts:
    2
    This solved my problm.
     
  37. vishal

    vishal

    Joined:
    Aug 8, 2012
    Posts:
    14
    Hi...

    In my case, the issue was resolved by re-installing unity3d
     
  38. bobmoff

    bobmoff

    Joined:
    Sep 23, 2014
    Posts:
    44
    Same here!
     
  39. _creatio_

    _creatio_

    Joined:
    Mar 21, 2013
    Posts:
    43
    For me the root of the problem was in Awesomium plugin.
    I had to disable Editor and x86_64 platforms (currently only x86 platforms are supported) and the settings of the:
    Awesomium.Unity.dll
    Awesomium.Unity.Core.dll

    When I did that, the exception has gone.
    Using Unity 5.3.6f1

    P.S. The problem of lack of information, seems to be in the C# compiler that doesn't give any file names, but only type names, that is not much informative. For me, the addition to the same stack trace as for the topic starter, was:

    The class System.Runtime.InteropServices.ComTypes.IStream could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    A kind of suggestion of a solution. Would be nice to look for the assembly in other platforms assembly sets (as Mono can't find the needed type in the current platform assembly set), to try to find a file name of the missing assembly and give an idea to the developer where to dig.
     
  40. zbalai

    zbalai

    Joined:
    May 28, 2012
    Posts:
    21
    I had ReflectionTypeLoadException with UnityPurchasing.
    Solution was to open services tab in Unity and log in.
    On a Mac I needed not only to open services tab, but also to pull out the tab into a separate window in order to log in and solve this issue. (otherwise the services tab stayed blank/empty)
     
  41. LucianoMacaDonati

    LucianoMacaDonati

    Joined:
    Dec 31, 2012
    Posts:
    10
    After disabling the Unity IAP and Ads services I had to manually delete a UnityPurchasing folder under Plugins.
     
    Symyon likes this.
  42. Guillaumzed

    Guillaumzed

    Joined:
    Mar 29, 2015
    Posts:
    71
    I also had the "unhandled exception... the classes in the module" error message.

    For me it was also because of Services Analytics and in-App purchasing which I needed so I couldn't delete my code about these things.

    What worked for me was just to click on the "services " tab (I suppose you need to be logged with your Unity login&password).

    Then ,when the content of the services tab appeared (ads / analytics etc.) , the error message disappeared.

    Unity 5.4.1f1
     
  43. DannyHellfish

    DannyHellfish

    Joined:
    Jan 20, 2014
    Posts:
    29
    Same problem after updating the Unity IAP plugin. Solved by deleting the plugin and importing it again from scratch. Unity 5.5.0b9
     
    Symyon likes this.
  44. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    What worked for me was one plugin was marked for all platforms but was actually only for WP8. Changing those settings fixed the issue.
     
  45. jatinsatani1008

    jatinsatani1008

    Joined:
    Oct 10, 2017
    Posts:
    1
    How to solve this error???

    Please Help you??
     

    Attached Files:

  46. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,948
    Can you attach editor.log?
     
  47. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    393
    Got this error (and keeps spamming even after recompile my monobehaviors) when decided to remove a material that's not used by the scene. Did it while progressive lightmapper was baking and caused the error to appear.

    Overall, although progressive lightmapper is much quicker than the Enlighted p.o.s. it seems to keep hoold of resources for a few minutes after it's terminated. Unity chokes and freezes after every 5 seconds, but then it slowly comes back to normal

    Unity 2017.2.0f3, win10
     
  48. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Sorry to revive this, but it's the only thread on the subject. I had this error when opening an old Unity 5.3.x project. Turns out my target platform had somehow switched to web. I made sure it was on standalone and the error went away.

    Specifically my error was for System.Runtime.InteropServices.ComTypes.FILETIME
     
    IgorAherne likes this.