Search Unity

IL2CPP Build Error with Unity 2019 1.0f2

Discussion in 'Editor & General Support' started by sdf_eee, Apr 30, 2019.

  1. sdf_eee

    sdf_eee

    Joined:
    May 30, 2015
    Posts:
    55
    I try to build my project with Win64, IL2CPP, .NET 4.x.

    then I get this error and failed.

    stdout:
    Fatal error in Unity CIL Linker
    System.ArgumentException: Member 'UnityEngine.Experimental.Rendering.RenderPipelineAsset' is declared in another module and needs to be imported
    ��ġ: Mono.Cecil.MetadataBuilder.LookupToken(IMetadataTokenProvider provider)
    ��ġ: Mono.Cecil.SignatureWriter.WriteTypeSignature(TypeReference type)
    ��ġ: Mono.Cecil.SignatureWriter.WriteMethodSignature(IMethodSignature method)
    ��ġ: Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
    ��ġ: Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
    ��ġ: Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
    ��ġ: Mono.Cecil.MetadataBuilder.AddTypes()
    ��ġ: Mono.Cecil.MetadataBuilder.BuildTypes()
    ��ġ: Mono.Cecil.MetadataBuilder.BuildModule()
    ��ġ: Mono.Cecil.MetadataBuilder.BuildMetadata()
    ��ġ: Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _)
    ��ġ: Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
    ��ġ: Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
    ��ġ: Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
    ��ġ: Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
    ��ġ: Mono.Linker.Steps.OutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
    ��ġ: Unity.Linker.Steps.UnityOutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
    ��ġ: Mono.Linker.Steps.OutputStep.OutputAssembly(AssemblyDefinition assembly)
    ��ġ: Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    ��ġ: Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    ��ġ: Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    ��ġ: Mono.Linker.Pipeline.Process(LinkContext context)
    ��ġ: Unity.Linker.UnityDriver.Run()
    ��ġ: Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
    ��ġ: Unity.Linker.UnityDriver.RunDriver()
    stderr:

    How can I fix it?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    It sounds like some assembly in the project is out of sync with the Unity API. Can you try to re-import any managed assemblies in the project? That should cause the API Updater to run and hopefully correct anything that is out of sync.
     
    sdf_eee likes this.
  3. sdf_eee

    sdf_eee

    Joined:
    May 30, 2015
    Posts:
    55
    re-import isn't working.
    but 2019.1.2f1 works like charm.
     
  4. dimib

    dimib

    Joined:
    Apr 16, 2017
    Posts:
    50
    I'm having the same issue. @JoshPeterson can you explain how to re-import managed assemblies? and is there a way to identify which assemblies might cause the issue?

    I'm using Unity 2019.1.3f1
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Unfortunately this error message does not indicate which assembly caused the problem. It will be an assembly that references the Unity API, so any assembly which does not use the Unity API should be fine.

    You can re-import an assembly be right click-ing on it in the project window and choosing the re-import option. That will cause the API Updater tool to process that assembly, and often will correct issues like this.
     
    araki14 likes this.
  6. araki14

    araki14

    Joined:
    Jul 28, 2014
    Posts:
    1
    I had same error at Unity 2019.1.3f1 Mac book pro and resolved.
    When I tried to build for iOS, I had same error.

    Window > Package Manager each package update,
    then, build completed with a result of 'Succeeded'
     
    Last edited: May 22, 2019
  7. nedimk

    nedimk

    Joined:
    Feb 12, 2014
    Posts:
    3
    Hi,

    I get the same error when I get build. (my game platform android )

    Im trying with IL2CPP, .NET 4X (target arch: ARMv7 and ARM64 options checked)

    I tried some things:
    - I deleted Library folder and re import all assets.
    - i created empty new project, i instaled lwrp and i get success 64bit build.
    And later I copied new projects "Packages" folder and "Library\PackageCache" folder to old game and reimported all assets but anything changed.
    - I deleted old LightweightRenderPipelineAsset file and created new and set graphic section.
    - I update all packages in Window\Package Manager\In Project
    Nothing changed;

    by the way project created unity 2018 and later updated 2019 and im using 2019.1.6.f1

    I spent a lot of time but not any changes.

    How can i fix ?

    stdout:

    Fatal error in Unity CIL Linker

    System.ArgumentException: Member 'UnityEngine.Experimental.Rendering.RenderPipelineAsset' is declared in another module and needs to be imported
    at Mono.Cecil.MetadataBuilder.LookupToken(IMetadataTokenProvider provider)
    at Mono.Cecil.SignatureWriter.WriteTypeSignature(TypeReference type)
    at Mono.Cecil.SignatureWriter.WriteMethodSignature(IMethodSignature method)
    at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
    at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
    at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
    at Mono.Cecil.MetadataBuilder.AddTypes()
    at Mono.Cecil.MetadataBuilder.BuildTypes()
    at Mono.Cecil.MetadataBuilder.BuildModule()
    at Mono.Cecil.MetadataBuilder.BuildMetadata()
    at Mono.Cecil.ModuleWriter.<>c.<BuildMetadata>b__2_0(MetadataBuilder builder, MetadataReader _)
    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
    at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
    at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
    at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
    at Mono.Linker.Steps.OutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
    at Unity.Linker.Steps.UnityOutputStep.WriteAssembly(AssemblyDefinition assembly, String directory, WriterParameters writerParameters)
    at Mono.Linker.Steps.OutputStep.OutputAssembly(AssemblyDefinition assembly)
    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Unity.Linker.UnityDriver.Run()
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
    at Unity.Linker.UnityDriver.RunDriver()
    stderr:
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:214)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, BuildTargetGroup, ManagedStrippingLevel, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:146)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:348)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:238)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:326)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Thanks.
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    If you can do so, it might be best to submit a bug report with this project. Something is corrupt, but I'm not sure what else you can to to repair it.
     
  9. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Any news on this issue? Having the same problem with 2019.1.6f1.
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    We don't know the cause of this issue yet. If you can provide us with a bug report to reproduce it, we will investigate it.
     
  11. nedimk

    nedimk

    Joined:
    Feb 12, 2014
    Posts:
    3
    Any news on this issue ? i can't bugfix because bug fixer is crushing :).

    If you tell me things I should try without bug fixing, let me look at them. The only problem I guess I can't publish the game is that I have used lwrp!
     
  12. RunSwimFly

    RunSwimFly

    Joined:
    Mar 2, 2011
    Posts:
    34
    This solution worked for me when building for iOS under OSX with Unity 2019.1.8f1.
     
  13. thonymartinezv

    thonymartinezv

    Joined:
    Jul 7, 2019
    Posts:
    1
    This solution worked for me
     
  14. Jasur1995

    Jasur1995

    Joined:
    May 13, 2019
    Posts:
    3
    I have a error please Help (Unity 2019.2.8)
     

    Attached Files:

  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    It looks like this might be a bad Unity installation. Can you try to build an empty project? Also, you may want to attempt to re-install Unity.
     
  16. Jasur1995

    Jasur1995

    Joined:
    May 13, 2019
    Posts:
    3
    [QUOTE = "JoshPeterson, post: 5039129, member: 660077"] Похоже, это может быть неправильная установка Unity. Можете ли вы попробовать построить пустой проект? Также вы можете попытаться переустановить Unity. [/ QUOTE]

    tried to create an empty project, also set another version (unity 2018.4.10)
    Sorry for my english
     

    Attached Files:

  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    No problem! Maybe the issue is related to the machine locale or paths to the Unity installation or the project with non-ASCII characters in them. Can you try changing the locale for the computer to US English?
     
  18. Jasur1995

    Jasur1995

    Joined:
    May 13, 2019
    Posts:
    3
    I tried to change the computer language to American English,
    also changed the installation path
    but still see an old error
     

    Attached Files:

  19. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    I'm not sure what the problem is then. Do you have any idea what the question marks are in the error message? I'm wondering if they are some non-ASCII characters that are not printed correctly. They might help explain the error.
     
  20. tinhnx_57

    tinhnx_57

    Joined:
    Dec 14, 2015
    Posts:
    1
    I had same problem when i build old project (unity 2018.2) on unity 2019. Back to unity 2018.2 then the problem go away. Hope this useful
     
  21. upendraakki329

    upendraakki329

    Joined:
    Sep 21, 2020
    Posts:
    6
    Did you guys fixed it i am facing same rror now in unity 2021 please help..
     
  22. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    updated probuilder to latest version solved this issue
     
    Bauschen likes this.