• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
3
Question by TrintarVIII · Jan 23, 2016 at 06:46 PM · exception

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
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image RKSW · Sep 03, 2016 at 03:16 AM 0
Share

Same problem after updating to 5.4.0.f3 and latest (30-AUG-2016) IAP API. Reimporting IAP did not help; toggling services did not help; I balk at reimport ALL just because.

Any other ideas?

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 :0

at $$anonymous$$ono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0

at $$anonymous$$ono.CSharp.RootNamespace.ComputeNamespace ($$anonymous$$ono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0

at $$anonymous$$ono.CSharp.GlobalRootNamespace.ComputeNamespaces ($$anonymous$$ono.CSharp.CompilerContext ctx) [0x00000] in :0

at $$anonymous$$ono.CSharp.Driver.LoadReferences () [0x00000] in :0

at $$anonymous$$ono.CSharp.Driver.Compile () [0x00000] in :0

at $$anonymous$$ono.CSharp.Driver.$$anonymous$$ain (System.String[] args) [0x00000] in :0

The following assembly referenced from C:\Users\cbdev\Documents\Unity\Drill1-535\Assets\Plugins\UnityPurchasing\Bin\Stores.dll could not be loaded: Assembly: UnityEngine.Purchasing (assemblyref_index=1) Version: 0.0.0.0 Public $$anonymous$$ey: (none) The assembly was not found in the Global Assembly Cache, a path listed in the $$anonymous$$ONO_PATH environment variable, or in the location of the executing assembly (C:\Users\cbdev\Documents\Unity\Drill1-535\Assets\Plugins\UnityPurchasing\Bin).

Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies. Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies. Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies. The class UnityEngine.Purchasing.IAmazonExtensions could not be loaded, used in Stores, Version=1.0.6086.27179, Culture=neutral, Public$$anonymous$$eyToken=null Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies. The class UnityEngine.Purchasing.IAmazonExtensions could not be loaded, used in Stores, Version=1.0.6086.27179, Culture=neutral, Public$$anonymous$$eyToken=null Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies. The class UnityEngine.Purchasing.IGooglePlayConfiguration could not be loaded, used in Stores, Version=1.0.6086.27179, Culture=neutral, Public$$anonymous$$eyToken=null Could not load file or assembly 'UnityEngine.Purchasing, Version=0.0.0.0, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies.

...

7 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by roppi2 · Dec 09, 2016 at 02:05 PM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by davidjohn123 · Dec 14, 2016 at 07:03 AM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • ‹
  • 1
  • 2

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

55 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Invalid PBX project - iOS Build Help! 2 Answers

Exceptions in C# 0 Answers

Problem with Lists and Remove 0 Answers

IndexOutOfRangeException: Array index is out of range / EnemiesSpawner.cs:18) 3 Answers

Cannot set parent for instantiated GameObject. (Exception: Can't destroy Transform component of...) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges