Upgrading to 2021 Editor - Tons of Errors

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?

1 Like

+1

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.

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://discussions.unity.com/t/807568/3

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

https://discussions.unity.com/t/826718/2

Share/Sharing source code between projects:

https://discussions.unity.com/t/719810/2

Setting up the right .gitignore file:

https://discussions.unity.com/t/834885/5

2 Likes

+1

…Did you try the fix that Joe-Censored suggested?

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

1 Like

I got several issues after upgrading a project to version 2021. The link below helped me solve my issues:

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.

1 Like

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?