Search Unity

Reference package test assemblies

Discussion in 'Package Manager' started by ST_ProductVIz, Aug 26, 2019.

  1. ST_ProductVIz

    ST_ProductVIz

    Joined:
    Nov 29, 2017
    Posts:
    27
    Hi,

    Should it be possible to add references of test assemblies of an added package to project test assemblies? If I do so, I always get "missing references" errors and the reference also does not show up in Visual Studio. Referencing any other assemblies (not marked as "Test") defined in that package works of course as expected.

    BR,
    Lukas
     
  2. BorisMongeau

    BorisMongeau

    Unity Technologies

    Joined:
    Feb 24, 2017
    Posts:
    58
    Hi Lukas,

    The package containing test assemblies to be referenced should be listed in the "testables" property of the project manifest. Otherwise test assemblies for that package are not compiled, and cannot be referenced without an error.

    Boris
     
  3. ST_ProductVIz

    ST_ProductVIz

    Joined:
    Nov 29, 2017
    Posts:
    27
    Hi Boris,

    Thank you, that did the trick!

    BR,
    Lukas