Purchasing: the name StandardPurchasingModule does not exist in current context

Thanks!This worked for me.

Solve: You must import in this order.

  1. IAP On.
  2. IAP import.
  3. Your sourcecode import.
2 Likes

In my case I was getting the error from a test class that has an asmdef. I had to add UnityEngine.Purchasing.dll and Stores.dll to the references and the error went away.

5090078--501533--assembly_reference.png

5 Likes

Thank you this worked a treat!!!

Skyboard you’re a lifesaver. Importing manually fixed it. Thank you.

That work for me.
Commented the lanes that give me errors, then the project compile in Unity and show you to install things, and then come back to uncoment the code :slight_smile:

Thanks in 2020 my friend

Thanks, that worked for me in unity 2019.3

Great + BIG LIKE

I noticed the same thing! I just deleted the files that were showing the errors. After deleting the last one, the installer magically started. Interesting. FYI the best forum to post IAP issues is here Unity Services - Unity Discussions

Very good catch, it didn’t even cross my mind P_P…!! Works a charm now!

Yes! Many thanks for that tip.

If you are using unity purchasing from an assembly, make sure you add Assembly Definition References to Unity.Purchasing, AND UnityEngine.Purchasing.Stores

5 Likes

It’s working solution. Tnk u.

Unity 2020.3.34
For anyone upgrading to a newer Unity version I managed to fix the issue by :
1- Make sure the IAP is on under “Services” (Window/General/Services)
2- Delete the folder "Assets/Plugins/UnityPurchasing
3- Comment the lines with errors or simply cut/past the whole class somewhere else, wait the editor to recompile then get back the class

Since I migrate from Unity 2018.4 to 2020.3 I faced the problem with missing StandardPurchasingModule (the same error was with 2021). If you are also using assemblies, then do not forget to add another assembly “UnityEngine.Purchasing.Stores”. In past, it was enough to have only “UnityEngine.Purchasing”. I hope it will saves sometimes time.

6 Likes