Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Difficulty Getting msc.rsp Working

Discussion in 'Windows' started by stonstad, Mar 6, 2019.

  1. RDeluxe

    RDeluxe

    Joined:
    Sep 29, 2013
    Posts:
    94
    Hello, sorry to dig this up.

    My csc.rsp file works perfectly fine locally, but seems to fail on Cloud Build ;

    [Unity] Assets/Scripts/Editor/Tools/CloudBuildMethods.cs(94,13): error CS0103: The name 'ZipFile' does not exist in the current context


    Are rsp files supported by cloud build ?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    The .rsp files should work the same on Cloud Build as they do locally. Can you confirm that Cloud Build is using the same Unity version as you are using locally?
     
  3. RDeluxe

    RDeluxe

    Joined:
    Sep 29, 2013
    Posts:
    94
    Hello,

    Yes the Unity version are exactly the same.

    Edit : Ok nevermind I feel stupid now, our gitignore add a *.rsp rule in it (written years ago). Removing it from gitignore and launching a "clean" build worked
     
    Last edited: Aug 26, 2019
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    It might be worth submitting a bug report then so we can investigate this.
     
  5. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    52
    Hi, what .dll did you reference, I am struggling to get it working. I am getting similar error as in previous replies. `System.IO.Compression.FileSystem.dll' could not be found.` . Unity 2019.2.2f1 . Could you share how you set it up, please?
    upload_2019-9-10_23-55-28.png
    I don't understand this - because unity already has those references. Also, they are referenced in visual studio assemblies. Why isn't it recognisable in code? I am trying to use `ZipFile` but no luck. I may try to copy .dll to project, but that is probably not the best way to do it.
     
  6. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    52
    My `csc.rsp` file looks like this
    -r: System.IO.Compression.ZipFile.dll
    .
    upload_2019-9-11_0-18-29.png
    This is what I get, it is looking for it in the root folder of the project.
    upload_2019-9-11_0-21-53.png
    After that I have copied the `.dll` file to Assets, set the reference in `csc.rsp` - then it tells me that the `.dll` is in binary, not a text format, gives an error.
     
  7. RDeluxe

    RDeluxe

    Joined:
    Sep 29, 2013
    Posts:
    94
    Our Assets/csc.rsp file looks like this :

    Code (CSharp):
    1. -r:System.IO.Compression.dll
    2. -r:System.IO.Compression.FileSystem.dll
    You should not have to copy any DLL. They are simply excluded by default by Unity, the csc file tells unity to include them.
     
    PixelLifetime likes this.
  8. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    52
    Thanks, that worked. For some reason `-r: System.IO.Compression.ZipFile.dll` alone didn't give me the expected results. But with both `-r:System.IO.Compression.dll` it works just fine. I still can't import `using System.IO.Compression.FileSystem;` in code, but I can access `ZipFile` and it says that it's in `System.IO.Compression`. Thank you for the help :)