A* 5.2.0 Failed to resolve assembly Clipper2Lib

Upgraded from 5.1.6 to 5.2.0. Game plays fine in the editor. When I try to build the project, it errors out a message about Clipper2Lib. The Clipper2Lib.dll is in the same place as 5.1.6. and no permissions or antivirus problems.

Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2022.3.49f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\7638221216482146823.rsp
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Clipper2Lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies)

Hi

Would you mind trying to restart the unity editor? Sometimes Unity does not refresh its internal caches properly until a restart.

Removed A* folders completely and reinstalled 5.2.0, cleared Unity library folder, restarted.

I’m having the same problem after upgrading from 5.1.6 to 5.2.1. The editor works just fine, but builds fail when trying to link Clipper2Lib (see error below). I’ve tried building from 2022.3.47 and 2022.3.49, both fail at this same point. I’ve cleared out my Library directory a number of times which has not helped. I use an asmdef for my project, and include the AstarPathfindingProject asmdef in it, but the linker is still not finding the Clipper2Lib from the astar asmdef:

$ grep Clipper2Lib Library/PackageCache/com.arongranberg.astar\@5.2.1/AstarPathfindingProject.asmdef -B1 -A2
    "precompiledReferences": [
        "Pathfinding.Clipper2Lib.dll",
        "Pathfinding.Ionic.Zip.Reduced.dll"
    ],

$ find Library/PackageCache/com.arongranberg.astar\@5.2.1/ -name "*Clipper2Lib.dll"
Library/PackageCache/com.arongranberg.astar@5.2.1/Plugins/Clipper/Pathfinding.Clipper2Lib.dll

@aron_granberg is it possible that you need to rebuild the astar asmdef on your end?

Build completed with a result of 'Failed' in 72 seconds (72496 ms)
Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2022.3.49f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\2239270061030991264.rsp
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Clipper2Lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies)
   at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type)
   at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference)
   at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
   at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
   at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet`1 typesAlreadyVisited)
   at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
   at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.Initialize()
   at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(UnityLinkContext context, UnityPipeline p, LinkRequest linkerOptions, TinyProfiler2 tinyProfiler, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(TinyProfiler2 tinyProfiler, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
   at Unity.Linker.UnityDriver.RunDriver()

I also get this error when building the player after i updated to 5.2.0 (removed old version first)

D:\unity\hub\editor\2022.3.49f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\3357718702970447957.rsp
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Clipper2Lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

I’ve got this same error after upgrading to latest.
Unity 6000.0.21f1

Hi

I have managed to replicate this. It seems to be an issue specifically with IL2CPP compilation.

I’ll try to get an update out on Monday that fixes the issue.
In the meantime, you can deploy using the Mono backend.

3 Likes

Did I just pick the wrong day to build a project with A* after long years of not using it? Same problem here, hope it gets fixed soon

Hello !
It seem that the problem happen when doing web build too, I got the error:

Building Library\Bee\artifacts\WebGL\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\6000.0.21f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\12508829817383201710.rsp
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘Clipper2Lib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’
at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable1 assemblies) at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type) at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference) at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember) at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason) at Mono.Linker.Steps.MarkStep.MarkEntireTypeInternal(TypeDefinition type, Boolean includeBaseTypes, DependencyInfo& reason, IMemberDefinition sourceLocationMember, HashSet1 typesAlreadyVisited)
at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Unity.Linker.Steps.UnityMarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.UnityRun(UnityLinkContext context, UnityPipeline p, LinkRequest linkerOptions, TinyProfiler2 tinyProfiler, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(TinyProfiler2 tinyProfiler, ILogger customLogger)
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
at Unity.Linker.UnityDriver.RunDriver()

UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

Hi

5.2.2 is out now, which hopefully should fix this issue.

Please delete your previous installation before upgrading.

2 Likes

Hi,
wow, that happened quickly. 5.2.2 fixed the issue .
thx

It works! Thank you!