Why does integrating Unity IAP result in compiler errors?


  • Integrating Unity IAP result in compiler errors
  • I am getting the error “CS0246: The type or namespace name `IPurchaseReceipt' could not be found”


You are receiving Errors including "CS0246: The type or namespace name `IPurchaseReceipt' could not be found ... System.Reflection.ReflectionTypeLoadException ... UnityPurchasing/Bin/Stores.dll ... UnityEngine.Purchasing".

These errors indicate Unity IAP has been disabled from the Unity Cloud Services window, or that you are disconnected from the Internet. It could also be an issue with the Plugin.

Please try reconnecting to your Internet, then sign into Unity Services and enable Unity IAP, or if necessary Reload (or Close and Reopen) the Services window. See also Setting up Unity IAP.

You can also try the following:

1. delete the plugin folder

2. move your purchase script out of the assets folder

3. Reimport the IAP plug via the asset store or services window.

4. Once fully imported, add your purchase script back into your project.

Was this article helpful?
0 out of 3 found this helpful
Have more questions? Submit a request


  • 0
    Michael Slifker

    10/4/2018 This issue still exists.  When enabling IAP it will come up win a ton of complie errors in the console.  Turn it off and they go away. I have tried everything mentioned and nothing works.  Installing, uninstalling, resetting, rebooting, deleting, you name it.  Unity 2018.10

  • 0
    Daragh Wickham

    Same issue here. Tearing my hair out.

  • 0
    Daragh Wickham

    OK, in my case I had a define if in the script I hadn't spotted that broke the  IStoreListener contract... I.e. One of the methods it's expecting to be implemented.

    Sneaky! :)

    Edited by Daragh Wickham
Article is closed for comments.