Unhandled Exception: System.Reflection.ReflectionTypeLoadException

After loading Unity and my project this morning I saw this error, preventing me from doing any play testing in the editor. Any ideas on what is going on?

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 /Users/Brian/Documents/flower_preiap/Assets/Plugins/UnityPurchasing/Bin/Stores.dll could not be loaded:
     Assembly:   UnityEngine.Purchasing    (assemblyref_index=1)
     Version:    0.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 (/Users/Brian/Documents/flower_preiap/Assets/Plugins/UnityPurchasing/Bin/).

Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The class UnityEngine.Purchasing.IGooglePlayConfiguration could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class UnityEngine.Purchasing.NativeJSONStore could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The class UnityEngine.Purchasing.IAppleConfiguration could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class UnityEngine.Purchasing.IAppleExtensions could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The class DialogType could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The class UnityEngine.Purchasing.FakeStore could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class DialogRequest could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class LifecycleNotifier could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The class <MessageCallback>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class <RetrieveProducts>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class <Purchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class <StartUI>c__AnonStorey0`1 could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class <OnProductListReceived>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null
The class <log>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.5816.24733, Culture=neutral, PublicKeyToken=null

If nothing helps:

  1. Rename Assets\Plugins\UnityPurchasing\Bin\Stores.dll to Stores.dll.off

  2. Close and open Unity3D app again

  3. Now Ctrl+0 or Window/Services should work fine

  4. Rename Stores.dll.off back to Stores.dll

with the step 1 you can try to login to Unity web services site if needs, I think this problem is local.

It helped me.
At first time I have a class Product in global scope and it conflicted with UnityEngine.Purchasing.Product, so be aware about such things. During my work on hiding the Product class my Internet connection get broken for 5 minutes, after it was impossible to make open services by Ctrl+0 or Window/Services. Well, if it requires to be in Internet for proper work - it would not be too comfortable to write a code offline.
I am on Unity 5.4.1p1

I’m having the same issue. Just propped up today.

login in services tab: it will work for you. i mean solve the problem for you. Enjoy. For future.

It is happened to me at the moment, but I can’t open “Services” tab. There is only 5 things at “Window” tab: Profiler, Asset Store, Animator, Animator Parameter and Editor Tests Runner. So, I am not be able to login Unity Services or doing something else with Unity.

@concel

Try Ctrl+0 the shortcut key combo for the Services window.

Had the same issue popping up for no apparant reason in my Unity 5.4 project with Unity IAP and Analytics. I noticed that all Unity Services were disabled but, other than described by Shibli, they were not only disabled, but disappeared completely from all menus and tabs.

I fixed it the following way:

  1. outside of Unity, remove the folder “Plugins” from your project (or the Unity Store-related stuff, if your plugins folder contains more stuff)
  2. switch back to Unity, so that it will update the project’s files.
  3. switch back on Unity services, which should again be available by now.
  4. add back the “Plugins” folder into your project.

Hope this helps.

Cheers,
Robert

My Solution is Deleting unity purchasing folder from the Plugin will remove this errror simplye