Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Integrating Nuget DLLs and dealing with assembly reference errors

Discussion in 'Editor & General Support' started by joshuuua, Jun 10, 2020.

  1. joshuuua

    joshuuua

    Joined:
    May 1, 2015
    Posts:
    3
    Hi there! I wanted some mocking-like capabilities to write tests for my project, and included the NSubstitute DLL and its dependencies by downloading a version from nuget, extracting the DLLs and putting them in my project. I can then use asmdef files to connect them up to my test folders.

    This works fine, but I get constant warnings like the following from all my test files:

    Assets\Tests\CharacterTests\BlockTests.cs(22,13): warning CS1701: Assuming assembly reference 'System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=xxx' used by 'NSubstitute' matches identity 'System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=xxx' of 'System.Threading.Tasks.Extensions', you may need to supply runtime policy

    There doesn't seem to be any actual problems, but I would love to fix (or failing that, silence) these issues. Most of the information online is about dealing with these in non-Unity contexts, so I'm wondering if anyone has any ideas here? Thanks!

    Also willing to hear arguments for other more Unity-friendly mocking systems.
     
    pjdarkwolf005 likes this.
  2. pjdarkwolf005

    pjdarkwolf005

    Joined:
    Jun 2, 2020
    Posts:
    1
    I have the same Problem too. anyone knows how to solve this?