Search Unity

[UWP] The call is ambiguous between the following methods or properties (not the obvious error)

Discussion in 'Windows' started by Maisey, Nov 20, 2015.

  1. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    When building my Unity project to a VS C# Project (UWP) I'm getting the following error:

    Code (CSharp):
    1. Error    CS0121    The call is ambiguous between the following methods or properties: [...]
    The method it's complaining about is an extension-method and the reason for complaining is because the C# project will reference two dlls, Assembly-CSharp and Assembly-CSharp-firstpass which both contains the definitions for this method, because both projects (Assembly-CSharp and Assembly-CSharp-firstpass) contains references to the scripts.

    How would I solve this?

    Thanks!
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Do both projects contain the same script? What's the path of the script?
     
  3. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Yes both projects contain the same scripts and the location is: Assets/Plugins/MyFolder/MyExtensions.cs

    It seems that this issue occurs when scripts are places in a Plugins folder, is this a bug or intended? @Tautvydas Zilys
     
    Last edited: Nov 20, 2015
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Looks like a bug. It definitely should not be added to both projects. Could we get a bug report on that?
     
  5. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Done. Issue number: 746296