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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Upgrading to 2021 Editor - Tons of Errors

Discussion in 'Editor & General Support' started by helloxman, Apr 1, 2021.

  1. helloxman

    helloxman

    Joined:
    Oct 10, 2019
    Posts:
    13
    Hello,

    My project works fine with 2020.3.2 editor in Mac Big Sur.

    When i try to upgrade it to 2021.1.0 or 2021.1.1 ; it gives 86 errors and all of them related to In App Purchase.

    These are samples:

    GUID [55a93c1fae8f54ec8971d41d9f80e30c] for asset 'Packages/com.unity.purchasing/Plugins/UnityPurchasing/unitypurchasing.bundle' conflicts with:
    'Assets/Plugins/UnityPurchasing/Bin/unitypurchasing.bundle' (current owner)
    We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

    GUID [96d2cf26bed484e33bcc7cefc49c4611] for asset 'Packages/com.unity.purchasing/Plugins/UnityPurchasing/Android/SamsungApps.aar' conflicts with:
    'Assets/Plugins/UnityPurchasing/Bin/Android/SamsungApps.aar' (current owner)
    We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

    GUID [5d137f890d26642219841a7f08fff0fb] for asset 'Packages/com.unity.purchasing/Editor/IAPGeneratedCredentials.cs.template' conflicts with:
    'Assets/Plugins/UnityPurchasing/Editor/IAPGeneratedCredentials.cs.template' (current owner)
    We can't assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

    Library/PackageCache/com.unity.purchasing@3.0.1/Runtime/SecurityStub/AppleValidator.cs(14,10): error CS0433: The type 'AppleReceipt' exists in both 'Security, Version=1.0.7698.24420, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Purchasing.SecurityCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

    Library/PackageCache/com.unity.purchasing@3.0.1/Runtime/SecurityStub/GooglePlayReceipt.cs(13,35): error CS0433: The type 'IPurchaseReceipt' exists in both 'Security, Version=1.0.7698.24420, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Purchasing.SecurityCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

    Library/PackageCache/com.unity.purchasing@3.0.1/Runtime/SecurityStub/AppleValidator.cs(22,10): error CS0433: The type 'AppleReceipt' exists in both 'Security, Version=1.0.7698.24420, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Purchasing.SecurityCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

    Library/PackageCache/com.unity.purchasing@3.0.1/Runtime/SecurityStub/CrossPlatformValidator.cs(17,10): error CS0433: The type 'IPurchaseReceipt' exists in both 'Security, Version=1.0.7698.24420, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.Purchasing.SecurityCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

    Library/PackageCache/com.unity.purchasing@3.0.1/Runtime/WinRTStub/Factory.cs(5,23): error CS0433: The type 'IWindowsIAP' exists in both 'UnityEngine.Purchasing.WinRTCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'winrt, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

    error CS1704: An assembly with the same simple name 'Purchasing.Common' has already been imported. Try removing one of the references (e.g. '/Users/mycomp/Desktop/mygame/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll') or sign them to enable side-by-side.

    error CS1704: An assembly with the same simple name 'Purchasing.Common' has already been imported. Try removing one of the references (e.g. '/Users/mycomp/Desktop/mygame/Assets/Plugins/UnityPurchasing/Bin/Purchasing.Common.dll') or sign them to enable side-by-side.

    How can i safely upgrade my project?
     
    alipaknahad likes this.
  2. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    228
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It looks like you've got the same package added to the project as both a package and in the Assets folder. This can happen for example if you've previously installed the package from an Asset Store version (which puts it in the Assets folder) or got it from GitHub. You need to choose either the Unity package, or the one in the Assets folder, not both.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,797
    The dupe packages that Uncle Joe identified above is likely an issue here.

    Also, please consider using source control in order to guard and protect your hard-earned work.

    Personally I use git because it is free and there are tons of tutorials out there to help you set it up.

    Here's how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up the right .gitignore file:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067
     
    PutridEx and Joe-Censored like this.
  5. Neozepian

    Neozepian

    Joined:
    Apr 2, 2017
    Posts:
    1
  6. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    ...Did you try the fix that Joe-Censored suggested?
     
  7. snowinrain

    snowinrain

    Joined:
    Jan 17, 2016
    Posts:
    15
    I had similar issues and Joe-Censored suggestion worked for me. Basically, there are 2 duplicated packages: one is under "Assets" folder, the other one is under "Packages" folder. Delete one of them should solve your problem
     
    kurokihiro likes this.
  8. bulentkaplan

    bulentkaplan

    Joined:
    Jun 2, 2019
    Posts:
    1
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    If the issue is related to Unity IAP, you would want to review the notes in Package Manager. We have moved IAP from an Asset to Package Manager. The notes mention to delete everything under /Assets/Plugins/UnityPurchasing as part of the upgrade. If you are using receipt validation (and you should be), you will need to regenerate your tangle files. As always, make a full project backup before doing any major project operation.
     
    kaisersam likes this.
  10. raz_bt

    raz_bt

    Joined:
    Mar 16, 2018
    Posts:
    12
    I'm having issues with Unity IAP. Unity 2021.3.10f1 can't find the IAP package. I followed the steps removed the plugin, installed version 4.4.1 with the package manager but I still get a bunch of errors similar to:
    Assets/Scripts/Utils/IAP/IAPManager.cs(8,42): error CS0246: The type or namespace name 'IStoreListener' could not be found (are you missing a using directive or an assembly reference?)
    Where IAPManager.cs is my code trying to use Unity IAP. It was working in Unity 2019 LTS but I had to update because of the Google Billing library update requirement.
    Any hints on what's wrong?