Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question IL2CPP build error - Failed to resolve assembly: 'MultiplayerImport'

Discussion in 'Editor & General Support' started by fendercodes, Jan 24, 2023.

  1. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    I'm running Unity 2022.2.2f1 URP, trying to do a Windows IL2CPP build. I get this error regardless of .NET Framework or .NET Standard when using IL2CPP. I don't know what "MultiplayerImport" is.. any ideas how to debug this further?

    Code (CSharp):
    1. Build completed with a result of 'Failed' in 55 seconds (55131 ms)
    2. Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
    3. C:\Program Files\Unity\Hub\Editor\2022.2.2f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\2410473323318317743.rsp
    4. Fatal error in Unity CIL Linker
    5. Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'MultiplayerImport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
    6.    at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies)
    7.    at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type)
    8.    at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference)
    9.    at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference)
    10.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    11.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    12.    at Mono.Linker.Steps.MarkStep.MarkFields(TypeDefinition type, Boolean includeStatic, DependencyInfo& reason, Boolean markBackingFieldsOnlyIfPropertyMarked)
    13.    at Mono.Linker.Steps.MarkStep.ApplyPreserveInfo(TypeDefinition type)
    14.    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
    15.    at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
    16.    at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited)
    17.    at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited)
    18.    at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
    19.    at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
    20.    at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
    21.    at Mono.Linker.Steps.MarkStep.Initialize()
    22.    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    23.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    24.    at Mono.Linker.Pipeline.Process(LinkContext context)
    25.    at Unity.Linker.UnityDriver.UnityRun(UnityLinkContext context, UnityPipeline p, LinkRequest linkerOptions, TinyProfiler2 tinyProfiler, ILogger customLogger)
    26.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(TinyProfiler2 tinyProfiler, ILogger customLogger)
    27.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
    28.    at Unity.Linker.UnityDriver.RunDriver()
    29. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
     
  2. Duskp

    Duskp

    Joined:
    Feb 26, 2013
    Posts:
    2
    I'm having the exact same issue on 2022.1.23 so I can add that I've extensively searched all my .asmdef files for any reference to anything called "multiplayerImport" to no avail.
    I'm also having this issue only on Android, IL2CPP builds for other platforms work normally
     
  3. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    Hmm that's weird. For me it doesn't build for Windows either. What .NET framework packages do you have installed on your PC? I wonder if we're using an old package or incorrect SDK
     
  4. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    @Duskp Oh, and do you have some form of Photon asset in your project?
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,789
    Can either of you submit a bug report that includes a project which reproduces this issue? If so, we might be able to debug it from our side.
     
  6. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    I've submitted bug report IN-30142 - Unfortunately its a fairly large project that you need to DL, but just build the player and you'll get the error. At least I do on my machine.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,789
    Thanks, our QA team will reproduce the issue and contact you if they run into any problems.
     
    fendercodes likes this.
  8. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    190
    Any news? Hoping to get a build up of our game before long.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,789
    No, sorry. I've asked our QA team to prioritize it now though.