[Solved] Reference Rewriter error after IAP 2.2.6 upgrade

Hello!

So I updated a project to IAP 2.2.6 today and am now starting to see this error when building for Windows UWP (IL2CPP)…

Reference Rewriter found some errors while running with command “–target=Temp\StagingArea\Data\Managed\UnityEngine.Purchasing.dll” “–target=Temp\StagingArea\Data\Managed\UnityEngine.Monetization.dll” “–target=Temp\StagingArea\Data\Managed\Unity.RemoteConfig.Editor.Core.dll”

Reference rewriter: Error: method System.Void UnityEngine.Purchasing.Extension.IStoreCallback::OnAllPurchasesRetrieved(System.Collections.Generic.List1<UnityEngine.Purchasing.Product>)` doesn’t exist in target framework. It is referenced from Stores.dll at System.Void UnityEngine.Purchasing.ScriptingStoreCallback/<>c__DisplayClass8_0::b__0().

I also updated Remote Config to 2.0.1 shortly after, so not exactly sure which one is causing the issue.

The game builds though and appears to run fine, although not checked if IAP is working yet.

1 Like

Hello! Thank you for pointing this out! We will investigate and try to get a fix for this ASAP. I have a hunch as to what the problem is.

1 Like

It’s also possible that the upcoming Package Manager com.unity.purchasing version 2.2.2 will fix this for you. It is undergoing the release process.

EDIT: I’ve tested a UWP build updating my com.unity.purchasing Package to our release candidate for 2.2.2 and it appears to remove the problem.

1 Like

Seems that function is only used by GooglePlay. Please let us know if your IAP in UWP works or not @hypergolic_games. We’re continuing to investigate in the meantime.

1 Like

Many thanks John.

I’ll update to 2.2.2 as soon as it’s released and let you know how it goes.

Hi John,

I’ve rebuilt the project with 2.2.2 and can confirm that the error no longer shows on build.

Many thanks for the help.

1 Like