Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

unity5.3.1 build ios error IL2CPP error for type 'System.Collections.ObjectModel.ReadOnlyCollection

Discussion in 'iOS and tvOS' started by qq364390162, Mar 22, 2017.

  1. qq364390162

    qq364390162

    Joined:
    Mar 22, 2017
    Posts:
    1
    Failed running D:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --copy-level=None --emit-null-checks --enable-array-bounds-check --enable-symbol-loading --development-mode --development-mode --extra-types.file="D:\Program Files\Unity\Editor\Data\il2cpp\il2cpp_default_extra_types.txt" --assembly="D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" --assembly="D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" --assembly="D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\Common.dll" --assembly="D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\LitJson.dll" --assembly="D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\JsonFx.dll" --assembly="D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\websocket-sharp.dll" --generatedcppdir="D:\bigfoot\BigFootClent\BigFootClent\Temp\il2cppOutput\il2cppOutput" --builder=none

    stdout:
    IL2CPP error for type 'System.Collections.ObjectModel.ReadOnlyCollection`1' in assembly 'D:\bigfoot\BigFootClent\BigFootClent\Temp\StagingArea\Data\Managed\mscorlib.dll'
    Additional information: Build a development build for more information. Path D:\bigfoot\BigFootClent\BigFootClent\Temp\il2cppOutput\il2cppOutput\mscorlib_System_Collections_ObjectModel_Collection_1_gen_148.h is a directory
    stderr:

    Unhandled Exception:
    System.IO.IOException: Path D:\bigfoot\BigFootClent\BigFootClent\Temp\il2cppOutput\il2cppOutput\mscorlib_System_Collections_ObjectModel_Collection_1_gen_148.h is a directory

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)

    at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0

    at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)

    at Unity.IL2CPP.CppCodeWriter.Create (NiceIO.NPath filename) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.SourceWriter.WriteTypeDefinitionFor (NiceIO.NPath outputDirectory, Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.SourceWriter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection genericsCollection, IEnumerable`1 allTypeDefinitions, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.AssemblyConverter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection, IEnumerable`1 allTypeDefinitions) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in <filename unknown>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.IOException: Path D:\bigfoot\BigFootClent\BigFootClent\Temp\il2cppOutput\il2cppOutput\mscorlib_System_Collections_ObjectModel_Collection_1_gen_148.h is a directory

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0

    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)

    at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0

    at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0

    at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)

    at Unity.IL2CPP.CppCodeWriter.Create (NiceIO.NPath filename) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.SourceWriter.WriteTypeDefinitionFor (NiceIO.NPath outputDirectory, Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.SourceWriter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection genericsCollection, IEnumerable`1 allTypeDefinitions, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.AssemblyConverter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection, IEnumerable`1 allTypeDefinitions) [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0

    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in <filename unknown>:0

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:425)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:275)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921
    Can you try a later Unity 5.3 version? I have a vague recollection that we corrected a bug like this, but I don't recall the specific version.