Search Unity

RSP files do not work

Discussion in 'Editor & General Support' started by gilley033, Nov 15, 2018.

  1. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,192
    I am trying to provide an alias for a dll plugin (System.Threading.dll). I have read that you should be able to do this by adding the alias to a rsp file. This appears to work for others but I have had zero luck so far.

    There is conflicting information about the naming of this rsp file. On older versions of Unity it looks like "smcs.rsp" should be used, but on newer versions maybe it should be "mcs.rsp" or "gmcs.rsp". I have tried all three on Unity 5.5, Unity 2017.3, and Unity 2018.2. Within each file this is what I have written:

    -reference:CustomThreadingLibrary=Assets/Plugins/System.Threading.dll
    Where CustomThreadingLibrary is the alias and Assets/Plugins/System.Threading.dll is the file I want to alias.

    In my code I should be able to write this at the top:

    extern alias CustomThreadingLibrary;
    however this just produces the error:

    The extern alias 'CustomThreadingLibrary' was not specified in a /reference option
    I made sure the code recompiled after creating the files. Any help would be greatly appreciated.
     
  2. BBB_brunoma

    BBB_brunoma

    Joined:
    Jan 10, 2017
    Posts:
    21
    Same issue here (although the title of this thread is a bit misleading). Having issues with the -reference / -r flag in a mcs.rsp / csc.rsp specifically when used in combination with "extern alias". I'm on unity 2018.3

    Edit: I submitted a bug for this here: https://fogbugz.unity3d.com/default.asp?1114775_phv9gc4esgle59p5
     
    Last edited: Jan 18, 2019
    LeanneCoyne likes this.
  3. LeanneCoyne

    LeanneCoyne

    Joined:
    May 8, 2018
    Posts:
    1
    Did you ever figure this out? I have the same issue with Newtonsoft.Json
     
  4. BBB_brunoma

    BBB_brunoma

    Joined:
    Jan 10, 2017
    Posts:
    21
    @LeanneCoyne: I just ended up rearranging some things to get rid of the dependencies in order to work around the issue. Seems like this issue isin't very high priority
     
  5. plaid_kota

    plaid_kota

    Joined:
    Mar 15, 2019
    Posts:
    3
    Exactly the same issue here. I'm also trying to set an alias to Newtonsoft.Json.
    Has anyone figured out?
     
  6. plaid_kota

    plaid_kota

    Joined:
    Mar 15, 2019
    Posts:
    3
  7. unity_it1rXGmI2JhukQ

    unity_it1rXGmI2JhukQ

    Joined:
    Aug 23, 2018
    Posts:
    1
    did they ever get back with an actual fix though..?