• 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
9
Best Answer

Answer by Shibli · Jan 24, 2016 at 09:48 AM

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

Comment
Add comment · Show 2 · 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 Shibli · Jan 24, 2016 at 09:51 AM 5
Share

I fixed it by logging into services and then turning on the Ads. You should try and turn on one of your services too, you've probably got Ads/Analytics/In-App purchases (the ones that Unity services provides) in your game and they're turned off.

avatar image TrintarVIII Shibli · Jan 24, 2016 at 05:57 PM 1
Share

Yes, that did it! Thank you very much. I turned off and then on all my services (Ads, Analytics, IAPs) and then it worked.

avatar image
0

Answer by hammad-zahid · Oct 08, 2016 at 05:24 AM

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

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 Concel · Nov 29, 2016 at 06:32 AM

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.

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 RKSW · Nov 29, 2016 at 05:19 PM

@concel

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

Comment
Add comment · Show 1 · 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
14

Answer by KEMBL · Nov 29, 2016 at 10:52 PM

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

Comment
Add comment · Show 7 · 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 eriktx · Dec 25, 2016 at 01:36 AM 0
Share

Worked great

avatar image Jolurawa · Mar 25, 2017 at 07:49 PM 0
Share

This solved my issue. Thank you very much!

avatar image AdamLiu · Mar 27, 2017 at 03:18 AM 0
Share

Works like a charm! Thank you sir!

avatar image Sylker · May 16, 2017 at 03:31 PM 0
Share

WoW! You just saved my ass. Thanks a bunch!

avatar image Mukikaizoku · Jun 25, 2018 at 03:02 AM 0
Share

Solved my issue as well - my service window would get stuck on "loading" on project open and I couldn't resolve the errors.

Show more comments
  • 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