Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Packages inside package folder empty

Discussion in 'Package Manager' started by chickenuggetz, Jul 16, 2018.

  1. chickenuggetz

    chickenuggetz

    Joined:
    May 15, 2013
    Posts:
    7
    Hi

    I am getting a bunch of build errors related to missing source files from various packages (textmeshpro/package-manager-ui/standard-events) after upgrading to unity 2018.2

    It seems the packages are correctly downloaded to the unity cache, but no files are copied across to Packages folder inside the project. The entire folder structure is there though.. just no files.

    Copying the packages across from the cache and manually renaming them makes the issue go away,

    Any idea what is causing this?
     
    Gizambica likes this.
  2. GarethIW

    GarethIW

    Joined:
    Jun 24, 2014
    Posts:
    45
    Seeing this too. Causes build errors in VS due to all the missing scripts, although i can still attach the debugger after ignoring the build failure error. Also causes compilation errors in any upgraded projects that use TextMeshPro calls (TMP.TextMeshPro.text for example) as the TMP scripts are not included in the project.

    I've tried all the usual Library/Temp folder deletion, .sln/.csproj deletion, and appdata package cache deletion to no avail.
     
  3. dstvr123

    dstvr123

    Joined:
    Jan 31, 2017
    Posts:
    1
    I am seeing this too.
    Opening a script (in visual studio 2015) yields a solution in which the following projects exist but their resources directories are missing the files that the project thinks they have:
    UnityEditor.StandardEvents
    UnityEditor.PackageManagerUI.Editor
    As such they fail to build so I can't build my project here for debugging.

    If you navigate to your Unity 2018.2 installation:
    C:\Program Files\Unity2018p2p0f2\Editor\Data\Resources\PackageManager\Editor
    Find the file for the package you are missing (com.unity.package-manager-ui-1.9.11)
    You can unzip (twice) the package files then paste them into your project (line up the Editor folder)
    <YourProjectDir>\Packages\com.unity.package-manager-ui
    Your visual studio project will now build.

    This is all needed on a new project so who tested this...
     
    Gizambica likes this.
  4. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    211
    hrm my packages folder is empty too. Will attempt to copy them from the editor install. Thanks for the tip @dstvr123
     
  5. chickenuggetz

    chickenuggetz

    Joined:
    May 15, 2013
    Posts:
    7
    Unity also seems to unzip/download the packages to the cache folder, located here:

    C:\Users\<USERNAME>\AppData\Local\Unity\cache\packages\packages.unity.com

    Copy the messed up package you need to the folder:

    <PROJECT>\Packages\

    Then remove the version tagged on the end (eg: '@1.9.10')

    Seems to fix the compile errors for me
     
  6. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    211
    for those of you on a mac they're located here:
    /Users/<USERNAME>/Library/Unity/cache/packages/packages.unity.com
     
  7. onnep

    onnep

    Joined:
    Jan 3, 2018
    Posts:
    8
    On Mac it (debugging and compiling) seems to work, but on Windows I needed to make a batch script to copy the Packages I need... :/
     
  8. _karl

    _karl

    Joined:
    Feb 6, 2017
    Posts:
    8
    This problem is new to me, as far as I know you do not need to have any package in the packages folder (except for the local ones). The packages are directly imported into the project over the cache by Unity.

    Maybe you have a similar problem like me, I had an old version of VS. Further details in this thread:
    https://forum.unity.com/threads/local-package-outside-of-project-folder.540170/
     
  9. onnep

    onnep

    Joined:
    Jan 3, 2018
    Posts:
    8
    Thanks _karl, updating the VS to 15.7.5 fixed the issue for me.
     
  10. Gizambica

    Gizambica

    Joined:
    Jul 12, 2017
    Posts:
    1
    Thanks dstvr123, this worked on my project
     
  11. _karl

    _karl

    Joined:
    Feb 6, 2017
    Posts:
    8
    @Gizambica
    You know thats not actually a solution. Please try updating Visual Studio and VS Tools for Unity as I suggested.
     
  12. kayy

    kayy

    Joined:
    Jul 26, 2011
    Posts:
    42
    @_karl I had VS 15.7.5 before updating from 2017.1.6 to 2018.2.1 but I have the same TextMeshPro errors showing up.
    I then installed the VSTU and SyntaxTree updates as suggested in the referenced thread but with no success. Even worse Unity showed a number of errors at startup in case of IL2CPP scripting backend. No show stoppers but annoying.

    Finally copying the TextMeshPro package manually (liek @McNuggetz2 suggested) was the only way to get it running.

    My target is UWP Hololens and I want to continue using .NET scripting backend which is way more convenient for development especially when a bunch of config files need to be added.

    All in all it is pretty weird and I don't like this solution, but I don't know anything better.
     
  13. DLively

    DLively

    Joined:
    Sep 6, 2015
    Posts:
    33
  14. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    51
    I'm having the same problem - Unity 2018.2.2.

    Using TextMeshPro as an example:

    - Use the package manager in Unity to add TextMeshPro.
    - The package is downloaded and extracted into the cache folder: \Users\[user]\AppData\Local\Unity\cache\packages
    - The c# sln is updated with a new project added for TextMeshPro.
    - Open the sln in Visual Studio 2015, and you will notice the TextMeshPro project structure there.
    - However, all the files are missing.
    - Check the local packages folder in your Unity project, and you will notice the TextMeshPro directory structure,
    but without any files.

    Presumably, Unity is supposed to copy the package from the cache into your local project structure.
    That's not working.

    At the moment, you have to manually copy the package into the local project folder under /packages.

    Anyone at Unity aware of this bug?
     
  15. halken

    halken

    Joined:
    Mar 11, 2017
    Posts:
    4
    Same problem for me with every version of Unity since 2018.1 I think. Currently using 2018.2.3f1. Contacted support about this a while ago and they weren't able to help me. I also updated VS to the latest - does not help.

    Unity, get your act together please and fix it! Even creating a brand new project does not work. Cannot build in Visual Studio.
     
  16. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    208
  17. mgeorgedeveloper

    mgeorgedeveloper

    Joined:
    Jul 10, 2012
    Posts:
    51
    BTW - I solved this by switching to Visual Studio 2017. The entire sln / csproj structure changed, and all the issues went away. The structure looks a lot simpler in Visual Studio 2017. Not sure if this related to Visual Studio or a different version of the Unity tools for VS.
     
  18. nav5

    nav5

    Joined:
    Nov 28, 2017
    Posts:
    2
    hi,
    i'm using visual studio 2017 with unity 2018.2.1f1 and i face the same problem too, is there any solution yet ?
    Thanks
     
  19. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    208
    @nav5, are you using the latest version of VS 2017 and the latest version of VSTU?
     
    mgeorgedeveloper likes this.
  20. nav5

    nav5

    Joined:
    Nov 28, 2017
    Posts:
    2
    hi, thank you for reply,
    i'm using VS 2017 15.4.2
    VSTU 3.4.0.2
    Edit : I update the VS to latest version and it works fine now ,thank you
     
    Last edited: Sep 6, 2018
  21. kayy

    kayy

    Joined:
    Jul 26, 2011
    Posts:
    42
    I just updated to Visual Studio 2017 15.8.4 with VSTU 3.8.0.3 but unfortunately it is still not working. I need to copy TextMesh Pro manually.

    I am on Unity 2018.2.5f1, Platform UWP / Hololens with Scripting Backend .NET. For testing I created an empty project and it is working fine. So it seems to be some combination of ingedients that is poisoning our project, MRTU, NewtonSoftJson, our own .NET Standard 1.4 DLLs, ...
     
  22. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    208
    Hi @kayy,

    Could you try to remove one ingredient after the other to see when it starts to work again?

    Regards,

    Pascal
     
  23. kayy

    kayy

    Joined:
    Jul 26, 2011
    Posts:
    42
    Hi @okcompute_unity ,

    I would like to :) but the project has grown in complexity and it would take too long. My customer won't like me to investigate something, we have a workaround for.
    I forgot to mention that the errors do show up only on .NET scripting backend which is marked as deprecated. So chances are high that Unity has low priority in fixing bugs for something which will be obsolete in the future (what is reasonable for me).

    So we will live with this little hack as we highly prefer the smoothness of .NET backend in development over IL2CPP, which we use for release builds only.
     
  24. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    208
    Totally understand :) If you ever get blocked again, don't hesitate to reply back! :)

    Regards,

    Pascal
     
    kayy likes this.
  25. LHAppri

    LHAppri

    Joined:
    Aug 18, 2017
    Posts:
    10
    @okcompute_unity. Same problem - empty packages folder structure and project will not compile.
    This is particularly annoying as I am working on a number of different Unity projects so have to fix it for each one. Not to mention having to remove the unwanted excess packages (Ads, Purchasing etc) from each project as well.

    I am using VS2015 - is there any chance of getting Unity packages working with that or is Unity really only going to be compatible with VS2017 from 2018.2 onwards?
     
  26. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    208
  27. sperepel

    sperepel

    Joined:
    Jul 29, 2016
    Posts:
    11
    If you install new version of VS and then delete all those extra folders from Packages and then restart VS it works.
     
    pedro_unity likes this.
  28. clivic

    clivic

    Joined:
    Mar 26, 2017
    Posts:
    3
    Confirmed. Problem fixed. Current version: 15.8.8
     
  29. clivic

    clivic

    Joined:
    Mar 26, 2017
    Posts:
    3
    In my case, just update the VS and there's no need to manually delete any folders.
     
    pedro_unity likes this.
  30. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    94
  31. stuart-anderson-csiro

    stuart-anderson-csiro

    Joined:
    Nov 6, 2017
    Posts:
    3
    This is still an issue as of latest Unity (2018.2.14f) and VS (15.8.9). It seems to be specific to UWP with .NET scripting backend when building with 'Unity C# Projects' enabled.

    Take a completely fresh, new project. TextMeshPro is included by default. Build for UWP with .NET backend and C# projects enabled. Unity build will succeed but the generated project build will fail with a bunch of missing TextMeshPro files (see attached screen). Same happens with any extra packages added via package manager.

    We've fixed this with a Build Postprocessor that replaces the paths in the generated project with the correct ones but it's pretty painful since the required information to do so properly (e.g. real paths of packages, including not just direct dependencies but multiple levels of nested dependencies) doesn't seem to be available without making multiple web requests via PackageManager.Client.Search. I know .NET backend is deprecated but for many working on UWP-centric projects (e.g. HoloLens) .NET + C# Projects is still the preferred development workflow so it'd be great to have that working out of the box again.

    capture.png
     
    kayy likes this.
  32. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    94
    Hello @stuart-anderson-csiro,

    Please update VSTU and let me know if that fixes the issue.

    Thanks,
    Pedro
    Unity STE
     
  33. stuart-anderson-csiro

    stuart-anderson-csiro

    Joined:
    Nov 6, 2017
    Posts:
    3
    Hi @pedro_unity, I've updated to VS 3.9.2 with VSTU 3.9.0.2 and can still reproduce this on an empty project (using Unity 2018.2.16f1)