Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Compile errors after upgrade to 3.0.1 due to not referenced projects

Discussion in 'Unity IAP' started by Asse1, Mar 29, 2021.

  1. Asse1

    Asse1

    Joined:
    Jan 9, 2013
    Posts:
    89
    Hey guys,

    we upgrade the Unity Purchasing package from 2.x to 3.0.1 and after that we got lots of compile errors.

    We use several asmdef files to manage our projects and the compile errors appear since the Purchasing packages aren't referenced in out projects. So I needed to check in which Purchasing library the missing classes are included and referenced those Purchasing asmdef files.

    This solved the missing classes one after the other but at some point Unity didn't manage to really include all the Purchasing projects in to our projects, even so they're referenced in our asmdef files.

    Referenced asmdef files in Unity:

    upload_2021-3-29_9-1-19.png

    VS project referenced assemblies:

    upload_2021-3-29_9-1-48.png

    Of course this stil leads to compile errors.

    I also tried moving the referenced asmdefs up and down but nothing works. We work with asmdef files a lot and never had problems with that.

    Of course the old Purchasing 2.x files are already deleted and I followed all other migration tasks.

    Any suggestions?
     

    Attached Files:

  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Asse1 Please provide steps to reproduce using a new/minimum project. I would not know what errors you might be seeing. We have other users using asmdefs without issue.
     
  3. Asse1

    Asse1

    Joined:
    Jan 9, 2013
    Posts:
    89
    It seems like I also needed to include "UnityEngine.Purchasing.SecurityStub", even so no classes of this assembly are used directly.

    Everything is referenced as expected afterwards.
     
    JeffDUnity3D likes this.
  4. Ghetaldus

    Ghetaldus

    Joined:
    Jul 15, 2017
    Posts:
    43
    I just upgraded from v2 => v3 as well and had some issues with asmdef references.
    Before upgrade I had to just use UnityEngine.Purchasing reference.
    Now after update I have to use all following references to make it work.
    upload_2021-3-30_16-44-14.png
    Seems like there is some issues with references in v3.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    That is expected.