Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

System.Numerics.Vectors is an ambiguous reference since 2021.2

Discussion in '2021.2 Beta' started by BlackclawsK, Sep 2, 2021.

  1. BlackclawsK

    BlackclawsK

    Joined:
    Jan 9, 2019
    Posts:
    100
    I have code that has been using System.Numerics.Vectors.Vector3.

    The issue is that starting in the 2021.2 lines there exist two references to System.Numerics.Vectors. Looking at the assembly references they come from:

    /Unity/Hub/Editor/2021.2.0b9/Editor/Data/NetStandard/compat/2.1.0/shims/netstandard/System.Numerics.Vectors.dll
    and
    /Unity/Hub/Editor/2021.2.0b9/Editor/Data/NetStandard/Extensions/2.0.0/System.Numerics.Vectors.dll

    Leading to an ambiguous reference exception that I can't fix because its exactly the same namespace. I also can't exclude any libraries or something similar because they are automatically referenced by Unity.

    Switching back to 2021.1.19f1 resolves this issue.
     
  2. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395
  3. BlackclawsK

    BlackclawsK

    Joined:
    Jan 9, 2019
    Posts:
    100
    Reported it as a bug anyway: https://fogbugz.unity3d.com/default.asp?1362491

    It might be related but I think its a slightly different issue, as Unity seems to be shipping two dlls that provide the same classes in the default configuration even without any additional packages.