Well I have a problem, and is that when I create a new project all packages are stored on Library/PackageCache but not in Packages folder (which contains only manifest.json file).
The problem generated here is that when I try to attach the solution to Unity (using “Attach to Unity” button on Visual Studio), Visual Studio throws a lot of errors at building time saying for example that TextMeshPro files miss.
I have read before that I have to delete this packages but no clue of how to do it (maybe erasing ““com.unity.textmeshpro”: “1.3.0”,” line from manifest.json, but maybe this could cause more problem, I don’t know).
But the more evident problem is causes when I try to install a local package (one made by me).
Actually, I’m working on Zios Theme Editor, I created a package using ASMDEF files, and everything go wells except for one situation: when I try to install this from scrach.
Is like the local package is located at the wrong placed. This doesn’t occurs when I manually copy the entire folder into Packages folder and I compile for first time the project.
Some context on Package Manager before I try to address your specific problem:
When Unity starts, UPM (unity package manager server) is started and it will create two folders:
One is part of the project creation (“packages” at project root) and it contains the project manifest. This .json file lists all packages specific to the context of this project. It contains the packages for the template you chose at project creation, any package updates that you may have pulled and any new packages you may have chosen to download.
The second is the global cache where the packages you have downloaded find themselves to be shared across projects. This is to improve availability for commonly used inter-project files and to avoid unnecessary downloads when starting a new project.
I presume here that you’re abbreviating the actual path “Library/PackageCache”. For me, on MacOS, the actual emplacement goes as follows: "Macintosh HD ▸ Users ▸ pedroa ▸ Library ▸ Unity ▸ cache ▸ packages ▸ packages.unity.com.
As stated in the context I wrote above, this is expected behaviour and not an issue in most user cases.
In this case, the recommended method would be to open the package manager UI, locate TMP and remove said package. Removing it from the project level manifest.json accomplishes the same thing and I haven’t seen nor heard about this causing any issues.
How are you installing your local package and how are you referencing it in the manifest.json?