Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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