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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. 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?