Fatal error in Unity CIL Linker (Unity6)

I am getting an error message when attempting to build in Unity 6. This did not happen in the previous version I was running. I also made a brand new Unity 6 project and still got this error:

Build completed with a result of ‘Failed’ in 48 seconds (47934 ms)
Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\6000.0.30f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\10220523851166166816.rsp
Fatal error in Unity CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘C:\Users\User1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’
at Unity.Linker.UnityAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Linker.LinkContext.Resolve(IMetadataScope scope)
at Unity.Linker.Steps.SetupAndRegisterUnityRootsSteps.ResolvePath(UnityLinkContext context, NPath assemblyPath)
at Unity.Linker.Steps.CopyModeStep.SetupAssemblies()
at Unity.Linker.Steps.CopyModeStep.Process()
at Mono.Linker.Steps.BaseStep.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 ()

For anyone with this issue, my project path contained a special character (-). I moved my entire project to a new directory that had no special characters in the filepath and it resolved.

1 Like

Thanks for providing a post-mortem. We see this all the time, and same goes for wonky non-ASCII characters.

Avoid any non-ASCII characters in directory and filenames (anywhere in path names):

Use only A-Z and 0-9. Do NOT use Space and try not to use underscore.

It might work… until it stops working… and then it will fail very spectacularly and mysteriously and you will waste untold amounts of your precious time and life chasing ghosts around your system instead of making your game.