Hi. I found that Unity 2022.2.0b5 fails to build IL2CPP player.
Here is part of error log:
Fatal error in Unity CIL Linker
Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: Microsoft.Extensions.Logging.StaticFilterOptionsMonitor.StaticFilterOptionsMonitor(LoggerFilterOptions): Error processing method āMicrosoft.Extensions.Logging.StaticFilterOptionsMonitor.StaticFilterOptionsMonitor(LoggerFilterOptions)ā in assembly āMicrosoft.Extensions.Logging.dllā
ā> System.NullReferenceException: Object reference not set to an instance of an object.
at Unity.Linker.Analytics.AnalyticsService.RecognizedReflectionAccessPattern(IMemberDefinition source, Instruction sourceInstruction, IMetadataTokenProvider accessedItem)
at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.MarkTypeForDynamicallyAccessedMembers(ReflectionPatternContext& reflectionContext, TypeDefinition typeDefinition, DynamicallyAccessedMemberTypes requiredMemberTypes)
at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.RequireDynamicallyAccessedMembers(ReflectionPatternContext& reflectionContext, DynamicallyAccessedMemberTypes requiredMemberTypes, ValueNode value, IMetadataTokenProvider targetContext)
at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.ProcessGenericArgumentDataFlow(GenericParameter genericParameter, TypeReference genericArgument, IMemberDefinition source)
at Mono.Linker.Steps.MarkStep.MarkGenericArgumentConstructors(IGenericInstance instance, IMemberDefinition sourceLocationMember)
at Mono.Linker.Steps.MarkStep.MarkGenericArguments(IGenericInstance instance, IMemberDefinition sourceLocationMember)
at Mono.Linker.Steps.MarkStep.GetOriginalType(TypeReference type, DependencyInfo reason, IMemberDefinition sourceLocationMember)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
at Mono.Linker.Steps.MarkStep.MarkInterfaceImplementation(InterfaceImplementation iface, TypeDefinition type)
at Mono.Linker.Steps.MarkStep.MarkInterfaceImplementations(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.MarkRequirementsForInstantiatedTypes(TypeDefinition type)
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()
Unity 2021.3.8f1 has no issue for same project.
Reported as IN-14788.
1 Like
Thanks for reporting this issue. Is Microsoft.Extensions.Logging.dll a DLL that is used in your project?
1 Like
Yes, My project used Microsoft.Extensions.Http.Polly and Microsoft.Extensions.Logging.dll is its dependency.
Thanks for the information - we will investigate this.
Unity said it is duplicated issue:
Iām not sure about that. Let me check with our QA team and report back.
1 Like
Yes, our QA team is re-checking the issue now.
1 Like
Any news for this? I canāt test Unity 2022.2 beta due to this issueā¦
No, sorry. Iāve not heard from our QA team about this again. Iāll check back in.
Registered to public issue tracker:
Excellent - we will investigate this.
Unity 2021.3.10f1 makes this issue too. I hope that the fix will be backported to 2021.3.x branchā¦
Yes, the fix is now on its way to a 2021.3 branch. I donāt yet know which release version will have it.
pohype
October 3, 2022, 6:51pm
14
Any idea on how to fix this temporarily until a more official fix is merged to the main branch @JoshPeterson ? Seems like it appears since Unity 2021.3.10f1 (and is also in Unity 2021.3.11f1), I donāt use any Microsoft.Extension.* dlls in my case.
Iām forced to use 2021.3.9f1 for production builds.
pohype:
Any idea on how to fix this temporarily until a more official fix is merged to the main branch @JoshPeterson ? Seems like it appears since Unity 2021.3.10f1 (and is also in Unity 2021.3.11f1), I donāt use any Microsoft.Extension.* dlls in my case.
Iām forced to use 2021.3.9f1 for production builds.
No, unfortunately we donāt have a work around for this. I think that the fix will make the next 2021.3 release though. So hopefully you can move forward soon.
1 Like
Kichang-Kim:
Hi. I found that Unity 2022.2.0b5 fails to build IL2CPP player.
Here is part of error log:
Unity 2021.3.8f1 has no issue for same project.
Reported as IN-14788.
I have the same issue in 2021.3.11
This issue will be corrected in 2021.3.12.
2 Likes
Hi! Is there any ETA for 2021.3.12 release?
It was just published today!
1 Like