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

UnityEngine.CoreModule references mscorlib, but mscorlib is not allowed

Discussion in 'Experimental Scripting Previews' started by SteveDET, Oct 17, 2018.

  1. SteveDET

    SteveDET

    Joined:
    Jan 23, 2018
    Posts:
    10
    Hello. I am trying to use the new .NET 4.x scripting backend, but come across the following errors when trying to make an Android build (both .NET 4.6 and .NET Standard 2.0).

    Code (csharp):
    1. ArgumentException: The Assembly mscorlib is referenced by UnityEngine.CoreModule ('C:\Program Files\Unity\Hub\Editor\2018.2.12f1\Editor\Data\PlaybackEngines\AndroidPlayer/Variations/mono/Managed/UnityEngine.CoreModule.dll'). But the dll is not allowed to be included or could not be found.
    this stems from a call to

    Code (csharp):
    1. UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:195)
    2. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    No hint as to what code in my project may be causing it. A default project changed to .NET 4.x scripting backend and built for Android works, but somewhere in the large amount of scripting code we have as standard across our projects is causing the above error.

    Firstly, the error makes no sense, because mscorlib is the core of .NET. Why is it not allowed? And why would UnityEngine.CoreModule be causing this error?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Can you submit a bug report with a project that causes this? I agree, the error message is not helpful, and makes little sense. We may need to look at all of the assemblies in the project to understand what is happening.
     
    nhold likes this.
  3. SteveDET

    SteveDET

    Joined:
    Jan 23, 2018
    Posts:
    10
    Submitted case 1091947. Keen to see if there is a fix for this as we wish to use the better SSL/TLS support in .NET 4.5.
     
    JoshPeterson likes this.