Search Unity

  1. New Unity Live Help updates. Check them out here!

    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,308
    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,308
    It might be worth submitting a bug report then so we can investigate this.
     
  5. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    55
    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:
    55
    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:
    55
    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 :)
     
  9. Jeet_9811

    Jeet_9811

    Joined:
    May 6, 2014
    Posts:
    15
    Hi, I am trying to add the System.Web.dll .NET Standard 3.5 libraries through a csc.rsp file. I am using Unity 2019.2.6f1, with IL2CPP/.NET Standard 4.x scripting.
    Screen Shot 2019-11-19 at 12.44.43 AM.png
    I am getting this compile time error (I have also included the System.Web.dll file in the asset/resources folder - Removing the file from asset/resources folder doesn't make any difference):-

    Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
    Copyright (C) Microsoft Corporation. All rights reserved.

    error CS2001: Source file '{\*\expandedcolortbl;;}' could not be found.

    Removing the csc.rsp file removes the compile time error but I am getting the below run time error when running and playing Unity.
    Error: Could not load signature of System.Web.Configuration.WebConfigurationHost:GetTargetFrameworkVersionEnumFromMoniker due to: Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:(null) signature:<none>

    Can you please let me know how can I include the System.Web.dll file to my project.
     
unityunity