简体   繁体   English

Unity CIL 中的致命错误 Linker - 与系统文件夹冲突

[英]Fatal error in Unity CIL Linker - conflict with a System folder

guys.伙计们。

So, the issue is, when I'm trying to make an IL2CPP build, I recieve this:所以,问题是,当我尝试构建 IL2CPP 时,我收到了:

    Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
C:\Programms\Unity\Editors\2021.2.11f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe @Library\Bee\artifacts\rsp\16461770786374037127.rsp
Fatal error in Unity CIL Linker
Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: System.Windows.Forms.XplatUIX11.SetDisplay(IntPtr): Error processing method 'System.Windows.Forms.XplatUIX11.SetDisplay(IntPtr)' in assembly 'System.Windows.Forms.dll'
 ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Mono.Posix, Version=2.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.MarkMethodBody(MethodBody body)
   at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
   at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   --- End of inner exception stack trace ---
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   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(Boolean noProfilerAllowed, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
   at Unity.Linker.UnityDriver.RunDriver()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I've been searching for an answer to this issue, but the fact it has a conflict with a System folder just kills me.我一直在寻找这个问题的答案,但它与系统文件夹发生冲突的事实让我很沮丧。

The Unity version is 2021.2.11f1, Mono build creates just fine. Unity版本是2021.2.11f1,Mono build creates就好了。

Could anyone please help?有人可以帮忙吗?

Please look in your project if you have included System.Windows.Forms.dll in case not please add it.请查看您的项目是否包含System.Windows.Forms.dll如果没有请添加它。

Also I think that System.Windows.Forms.dll it's not suported by Unity so please search if you have any reference to it and replace it in that case.此外,我认为System.Windows.Forms.dll不受 Unity 支持,因此如果您有任何参考,请搜索并在这种情况下替换它。

I'm almost for sure that is an issue related to references maybe it fixes including all the dlls that are asked.我几乎可以肯定这是一个与引用相关的问题,也许它修复了所有被询问的dlls

There is a package called NuGetForUnity that it might help.有一个名为NuGetForUnity的 package 可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM