Search Unity

VS fails to find packages files

Discussion in 'Package Manager' started by Imakhiil, Dec 1, 2018.

  1. Imakhiil

    Imakhiil

    Joined:
    Oct 11, 2013
    Posts:
    96
    Hi. I wanted to test some of the preview packages so I added them to the project in Package Manager. Unfortunately, when I open the c# project in VS, it fails to find any files of the packages I added <Entities, Jobs, Burst and Collections>.

    A quick look at the Output log seems to suggest that it tries to find them inside projects Packages directory:
    Code (CSharp):
    1. [Failure] Could not find file '[...]\EmptyTestProject\Packages\com.unity.entities\Unity.Rendering.Hybrid\MeshRenderBoundsUpdateSystem.cs'.
    To my current understanding it shouldn't happen since these files are supposed to be in a different directory. When I add some code that uses classes of these packages, the game builds properly, even though even a simple
    using Unity.Entities;
    causes VS to show the "Entities does not exist inside Unity namespace (are you missing assembly reference?)" error. This made me think that I was expected to add an asmdef file that references all of the included packages. However, it did not solve the issue. Moreover, I noticed that when I open the project in VS, it creates empty directories for all packages.

    I'm using Unity 2018.3.0b11, these are version of the packages, from my manifest.json file:
    Code (CSharp):
    1.     "com.unity.burst": "0.2.4-preview.37",
    2.     "com.unity.collections": "0.0.9-preview.10",
    3.     "com.unity.entities": "0.0.12-preview.21",
    4.     "com.unity.jobs": "0.0.7-preview.5",
     
  2. Imakhiil

    Imakhiil

    Joined:
    Oct 11, 2013
    Posts:
    96
    It turned out that I had 2 different versions of VS and Unity was using the older one. Changing it to the newer version fixed the issue.