Search Unity

Re: Unable to disable FacebookStore.dll from compiling on unsupported platforms

Discussion in 'Unity IAP' started by hogwash, May 24, 2018.

  1. hogwash

    hogwash

    Joined:
    Oct 12, 2012
    Posts:
    115
  2. hogwash

    hogwash

    Joined:
    Oct 12, 2012
    Posts:
    115
    We've created stub DLL's (for Stores.dll and UnityEngine.Purchasing.dll) that we only have enabled for console platforms + we've disabled the official Stores.dll on those same platforms and this seems to workaround the issue for now.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    We are still looking into the issue. Your approach is correct, but you would need to be careful to replace the Dll's after an IAP upgrade.
     
  4. Andrew-Carvalho

    Andrew-Carvalho

    Joined:
    Apr 22, 2013
    Posts:
    11
    Chiming in that we have a similar problem.

    Editing the link.xml file in the script folder of the plugin can fix the linker issue by allowing it to ignore missing dlls. Add the ignoreIfMissing="1" attribute to the assembly nodes. I've attached our link.xml.

    It looks like if the linker fails to find the dll the entire chain is removed as I can't find any trace of the purchasing dlls in our target platform's build.
     

    Attached Files:

    • link.zip
      File size:
      336 bytes
      Views:
      41
  5. Kreep

    Kreep

    Joined:
    Aug 1, 2013
    Posts:
    9
    Same error here. Unable to set any flag for the Facebook dlls, making the project uncompilable on Nintendo Switch.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,944
    The work around from engineering has stated the following, although I am unable to test directly. All the steps might not be necessary in your tests, but might be good to walk through them first with the suggested empty project:
    • Create an empty Unity project.(Save the empty scene as Main.unity just in case)
    • Activate Unity Services, and ensure that IAP (and Analytics, a dependency) are activated.
    • From the IAP Services window, import the Purchasing plugin.
    • Change the target platform to Nintendo Switch. (add Main.unity to the scene list just in case)
    • Try to build an NSP, confirm that errors come regarding "UnityEngine.Purchasing" and "Stores"
    • Configure the plugin at Plugins/UnityPurchasing/bin/Stores.dll to exclude the Switch platform.
    • Build the attached solution, drag the resulting two DLLs into the project root (or anywhere)
    • Mark the plugins as only for Switch.
    • Build again, should get an NSP without issues.